-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (57 loc) · 2.49 KB
/
ci-paper.yaml
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
name: CI Paper
# This workflow is triggered on pushes to the repository.
on:
push:
branches:
- master
paths:
- '**/paper/**'
jobs:
build:
name: Build paper PDF
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: check input path
id: inputPath
uses: notiz-dev/github-action-json-property@release
with:
path: '.vscode/settings.json'
prop_path: 'boilerplatePaper.inputPath'
- name: Download Bibtex file
run: curl $BIBTEX_LINK -L -o output/bibtex.bib
env:
BIBTEX_LINK: ${{ secrets.BIBTEX_LINK }}
- name: List markdown files
run: cd ${{steps.inputPath.outputs.prop}} && echo "::set-output name=md_files::$(ls -1 paper/*.md | tr '\n' ' ')"
id: input_files
- name: Run Pandoc
uses: docker://pandoc/latex:2.18.0
with:
entrypoint: /bin/sh
args: >-
-c "
tlmgr repository add ftp://tug.org/historic/systems/texlive/2021/tlnet-final &&
tlmgr option repository ftp://tug.org/historic/systems/texlive/2021/tlnet-final &&
tlmgr update --self &&
tlmgr install texliveonfly &&
apk add --no-cache curl git python3 gcc py3-pip python3-dev musl-dev linux-headers util-linux &&
pip3 install git+https://github.com/jschlatow/pandoc-theoremnos.git@nextrelease --user &&
export PATH="/github/home/.local/bin:$PATH" &&
ln -s /usr/bin/python3 /usr/bin/python &&
curl https://github.com/lierdakil/pandoc-crossref/archive/refs/tags/v0.3.13.0.tar.gz -L -O &&
tar -C /usr/bin -zxvf v0.3.13.0.tar.gz &&
rm v0.3.13.0.tar.gz &&
cd ${{steps.inputPath.outputs.prop}} &&
pandoc --defaults=defaults/paper.yaml --output=../output/paper-pre.tex --to=latex --bibliography=../output/bibtex.bib ${{ steps.input_files.outputs.md_files }} &&
texliveonfly --terminal_only --arguments='-synctex=1 -interaction=nonstopmode -output-directory=../output' ../output/paper-pre.tex &&
pandoc --defaults=defaults/paper.yaml --bibliography=../output/bibtex.bib ${{ steps.input_files.outputs.md_files }} &&
cd ../output &&
find . ! -name 'paper.pdf' -type f -exec rm -f {} +
"
- name: Upload artifacts
uses: actions/upload-artifact@master
with:
name: output
path: output