-
Notifications
You must be signed in to change notification settings - Fork 201
60 lines (51 loc) · 1.67 KB
/
latex-compile.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
49
50
51
52
53
54
55
56
57
58
59
60
# This workflow enables CI for compiling TeX file
# GitHub Action Docs: https://help.github.com/en/actions
name: LaTeX Compile
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Compile the LaTeX document with XeLaTeX
- name: Compile whu-thesis
uses: xu-cheng/latex-action@v2
with:
root_file: whu-thesis-demo.tex
args: -xelatex -file-line-error -interaction=nonstopmode -shell-escape
extra_system_packages: "fontconfig"
pre_compile: "fc-cache -f && rm -rf whuthesis-demo.pdf && rm -rf whu-thesis-demo-spine.pdf"
- name: Compile opening
uses: xu-cheng/latex-action@v2
with:
root_file: opening-demo.tex
args: -xelatex -file-line-error -interaction=nonstopmode -shell-escape
extra_system_packages: "fontconfig"
pre_compile: "fc-cache -f && rm -rf opening-demo.pdf"
# Upload compiled pdf to artifacts if compiled successfully
- name: Upload whu-thesis
uses: actions/upload-artifact@v2
if: success()
with:
name: whu-thesis-demo.pdf
path: whu-thesis-demo.pdf
- name: Upload opening
uses: actions/upload-artifact@v2
if: success()
with:
name: opening-demo.pdf
path: opening-demo.pdf
- name: Upload spine
uses: actions/upload-artifact@v2
if: success()
with:
name: whu-thesis-demo-spine.pdf
path: whu-thesis-demo-spine.pdf