-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (38 loc) · 1009 Bytes
/
build.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
name: Build
run-name: Render PDFs
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build LaTeX project and generate PDFs
uses: xu-cheng/latex-action@v2
with:
root_file: "*.tex"
glob_root_file: true
- name: Upload PDFs as artifact
uses: actions/upload-artifact@v3
with:
name: PDF
path: "*.pdf"
- name: Upload PDFs as release
uses: softprops/action-gh-release@v1
with:
body: Current state of PDFs
name: Latest PDFs
tag_name: current
files: "*.pdf"
- name: Prepare files for gh-pages
run: |
mkdir -p public
mv *.pdf public/
- name: Publish PDFs to gh-pages branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public