-
Notifications
You must be signed in to change notification settings - Fork 11
65 lines (59 loc) · 1.79 KB
/
deploy.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Deploy Wiki
on:
# push:
# branches:
# - main
# schedule:
# - cron: "0 10 5,15,25 * *"
repository_dispatch:
types: [deploy-event]
jobs:
deploy:
permissions:
pages: write
id-token: write
contents: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
env:
PYTHON_VERSION: 3.x
SRC_DIR: latex-data
steps:
- name: Checkout site
uses: actions/checkout@v4
- name: Checkout data
uses: actions/checkout@v4
with:
repository: hantang/latex-data
token: ${{ secrets.GH_TOKEN }}
path: ${{ env.SRC_DIR }}
fetch-depth: 1
ref: ${{ github.ref }}
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Build
run: bash ${{ env.SRC_DIR }}/deploy.sh
- name: Git auto commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_user_name: "github-actions[bot]"
commit_user_email: "41898282+github-actions[bot]@users.noreply.github.com"
commit_author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
commit_message: Automated update by github action
# commit_options: '--no-verify --signoff'
push_options: '--force'
file_pattern: "README*.md data/*.csv"
- name: Setup pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: site
- name: Deploy to GitHub pages
id: deployment
uses: actions/deploy-pages@v4