-
Notifications
You must be signed in to change notification settings - Fork 5
41 lines (35 loc) · 1.01 KB
/
generate-pdfs.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
name: Generate PDFs from TeX
on:
push:
paths:
- '**/*.tex'
permissions:
contents: write
jobs:
generate-pdfs:
name: Generate PDFs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Gather changed TeX files
id: changed-files
uses: tj-actions/changed-files@v37
with:
files: '**/*.tex'
separator: "\n"
- name: Compile TeX documents
uses: xu-cheng/latex-action@v2
if: ${{ steps.changed-files.outputs.all_changed_files != '' }}
with:
root_file: ${{ steps.changed-files.outputs.all_changed_files }}
work_in_root_file_dir: true
latexmk_use_xelatex: true
- name: Commit and push PDFs
run: |
shopt -s globstar
git config user.name github-actions
git config user.email github-actions@github.com
git add **/*.pdf
git commit -m "Generate PDFs from commit $GITHUB_SHA"
git push