-
Notifications
You must be signed in to change notification settings - Fork 4
53 lines (53 loc) 路 1.55 KB
/
Copy pathmain.yml
File metadata and controls
53 lines (53 loc) 路 1.55 KB
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
name: writeapaper
on: [push]
jobs:
paper:
runs-on: ubuntu-latest
env:
DIR: cheat_sheets
FILES: "algorithms_coding.tex data_science_case.tex data_science_coding.tex"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install TeXlive
run: sudo apt-get update && sudo apt-get install texlive texlive-publishers texlive-science latexmk cm-super
- name: LaTeX compile
working-directory: ${{ env.DIR }}
run: |
for FILE in ${{ env.FILES }}; do
pdflatex "$FILE"
pdflatex "$FILE"
done
- name: move
run: mkdir -p github_artifacts && mv ${{ env.DIR }}/*.pdf ./github_artifacts/
- name: Upload pdf as artifact
uses: actions/upload-artifact@v2
with:
name: compiled_pdfs
path: ./github_artifacts
deploy:
needs: [paper]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
path: github_artifacts
- name: move
run: mkdir -p github_deploy && mv github_artifacts/*/* github_deploy
- name: deploy on orphan branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./github_deploy
publish_branch: build
force_orphan: true
clean:
needs: [deploy]
runs-on: ubuntu-latest
steps:
- name: delete
uses: geekyeggo/delete-artifact@v2
with:
name: '*.pdf'