-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (46 loc) · 1.31 KB
/
build-latex.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
name: Build LaTeX document
on:
push:
branches:
- master
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build_latex:
runs-on: ubuntu-latest
env:
PAPER: "main"
steps:
- name: Set up Git repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Compile LaTeX document
id: compileLaTeXdocument
uses: xu-cheng/latex-action@v3
with:
root_file: |
${{ env.PAPER }}.tex
working_directory: tex
extra_system_packages: "git patch"
latexmk_shell_escape: true
pre_compile: git config --global --add safe.directory /github/workspace
continue-on-error: true
- name: Upload PDF
if: steps.compileLaTeXdocument.outcome == 'success'
uses: actions/upload-artifact@v3
with:
name: Success--Here-is-the-PDF
path: |
tex/${{ env.PAPER }}.pdf
- name: Upload build logs
if: steps.compileLaTeXdocument.outcome == 'failure'
uses: actions/upload-artifact@v3
with:
name: Build-Failed--Here-are-the-Logs
path: |
tex/**/*.log
- name: Fail job if build failed
if: steps.compileLaTeXdocument.outcome == 'failure'
run: exit 1