generated from JacksonBurns/blank-python-project
-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (41 loc) · 1.29 KB
/
paper.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
# .github/workflows/paper.yml
name: Convert Paper to PDF
# This workflow is triggered manually or on pushes to the repository.
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
# Paths can be used to only trigger actions when you have edited certain files, such as a file within the /docs directory
paths:
- 'paper/**'
- 'paper/images/**'
jobs:
converttopdf:
name: Build PDF
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup PDF Engine
run: |
sudo apt-get update
sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
- uses: r-lib/actions/setup-pandoc@v2
with:
# the default.latex file used in the paper directory is only suitable for this version
pandoc-version: '3.1.6'
- name: Build
run: |
cd paper
pandoc --citeproc -s paper.md -o paper.pdf --template default.latex --pdf-engine=pdflatex --pdf-engine-opt=-output-directory=foo
- uses: actions/upload-artifact@v4
with:
name: paper
path: paper/paper.pdf
- uses: actions/upload-artifact@v4
with:
name: build_files
path: paper/foo