-
Notifications
You must be signed in to change notification settings - Fork 29
62 lines (52 loc) · 1.78 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
#
# Build and deploy the documentation
#
name: Deploy
on:
#pull_request: # enable pull_request for testing
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
# Cancel previous runs that are not completed
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Build HTML documentaiton
run: make build_html
- name: Install TinyTeX
uses: r-lib/actions/setup-tinytex@v2
- name: Install LaTeX packages
run: |
tlmgr update --self
tlmgr install capt-of ctex datetime2 enumitem everysel fancyhdr \
fandol float ms needspace oberdiek parskip sourcecodepro tabulary \
titlesec tracklang ulem upquote varwidth wrapfig \
xcolor xecjk zhnumber
# Update the fonts
sudo cp -r ~/.TinyTeX/texmf-dist/fonts/opentype/adobe/ /usr/share/fonts/opentype
fc-cache -f -v
- name: Build PDF documentaiton
run: make build_pdf
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/dirhtml
# Only keep the latest commit to avoid bloating the repository
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'