-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (58 loc) · 2.03 KB
/
compile-pdfs.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
name: Compile PDFs
run-name: "Recompile after ${{ github.actor }}'s changes"
on: [push]
jobs:
compile-pdfs:
runs-on: ubuntu-latest
container:
image: texlive/texlive:latest
env:
TEXINPUTS: ".:..:"
steps:
- name: Install `gh`
run: |
(type -p wget >/dev/null || (apt update && apt-get install wget -y)) \
&& mkdir -p -m 755 /etc/apt/keyrings \
&& wget -qO- \
https://cli.github.com/packages/githubcli-archive-keyring.gpg | \
tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) \
signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] \
https://cli.github.com/packages stable main" | \
tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt update \
&& apt install gh -y
- name: Check out document sources
uses: actions/checkout@v4
- name: Create build directory
run: mkdir build
- name: list
run: ls
- name: Compile statutes
run: |
latexmk -outdir=../build -cd stadgar/stadgar.tex
- name: Compile regulations
run: |
latexmk -outdir=../build -cd reglemente/reglemente.tex
- name: Compile policies
run: |
for filename in policyer/*.tex; do
latexmk -outdir=../build -cd $filename
done
- name: Compile guidelines
run: |
for filename in riktlinjer/*.tex; do
latexmk -outdir=../build -cd $filename
done
- name: List outputs
run: ls build
- name: Create release
if: ${{ github.ref_name == 'main' }}
run: |
git config --global --add safe.directory \
/__w/styrdokument/styrdokument
gh release delete latest -y
gh release create latest build/*.pdf
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}