-
Notifications
You must be signed in to change notification settings - Fork 22
38 lines (36 loc) · 1.08 KB
/
build_document.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
name: Build PDF
on:
workflow_call:
inputs:
document_name:
required: true
type: string
latex_build_entry:
required: true
type: string
build_working_directory:
required: false
type: string
jobs:
build-document:
name: Build PDF
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build latex
uses: xu-cheng/latex-action@v2
with:
root_file: ${{ inputs.latex_build_entry }}
args: -jobname=${{ inputs.document_name }}
latexmk_use_xelatex: true
work_in_root_file_dir: ${{ inputs.build_working_directory }}
- name: Move PDF if created in working directory
if: ${{ inputs.build_working_directory != '' }}
run: mv ${{ inputs.build_working_directory }}/${{ inputs.document_name }}.pdf ${{ inputs.document_name }}.pdf
- name: Upload PDF
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.document_name }}
path: ${{ inputs.document_name }}.pdf