-
Notifications
You must be signed in to change notification settings - Fork 68
48 lines (46 loc) · 1.36 KB
/
build-slides.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
name: Build LaTeX slides
on:
push:
paths:
- 'talk/**'
pull_request:
paths:
- 'talk/**'
- '.github/workflows/**'
# Cancel running jobs on force-push
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
build_latex:
runs-on: ubuntu-latest
strategy:
matrix:
version: [ essentials, full ]
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Compile essentials
uses: xu-cheng/latex-action@v3
if: matrix.version == 'essentials'
with:
root_file: C++Course.tex
latexmk_shell_escape: true
args: -pdf -interaction=nonstopmode -halt-on-error -usepretex=\def\makebasic{}
working_directory: talk
extra_system_packages: "py-pygments"
- name: Compile full course
uses: xu-cheng/latex-action@v3
if: matrix.version == 'full'
with:
root_file: C++Course.tex
latexmk_shell_escape: true
args: -pdf -interaction=nonstopmode -halt-on-error
working_directory: talk
extra_system_packages: "py-pygments"
- name: Upload PDF as artifact
uses: actions/upload-artifact@v3
with:
name: PDF_${{matrix.version}}
path: |
talk/C++Course.pdf