-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.13 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: CI
on:
push:
schedule:
- cron: "0 8 * * *"
defaults:
run:
shell: pwsh
jobs:
update:
runs-on: ubuntu-latest
env:
PYTHONUTF8: 1
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: "3.12"
- name: Prepare env
run: |
python -m pip install -r ./requirements.txt
sed -i 's/\"package\"/\"image\"/' ./config.json
- name: Checkout pages
run: |
git fetch origin gh-pages
git worktree add ./dist gh-pages
- name: Force update
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: |
rm ./dist/process.json
- name: Run
run: |
python -m index
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist
- name: Deploy GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.PA_TOKEN }}
branch: gh-pages
folder: ./dist