-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (26 loc) · 916 Bytes
/
main.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
name: Github Actions CI to build pdf from tex source.
on: push
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
args: -pdf -file-line-error -halt-on-error -interaction=nonstopmode
pre_compile: tlmgr update --self && tlmgr update --all
post_compile: latexmk -c && mv main.pdf lecture_notes.pdf
- name: Check pdf file
run: |
file lecture_notes.pdf | grep -q ' PDF '
- name: Upload file to repository
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update lecture notes PDF
file_pattern: lecture_notes.pdf