Skip to content

Commit

Permalink
[Repoändringar] Lägg till automatiskt kompilering av dokumenten
Browse files Browse the repository at this point in the history
  • Loading branch information
fnurkla committed Aug 21, 2024
1 parent 4ad8f33 commit 69ff195
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 313 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/compile-pdfs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
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
run: |
git config --global --add safe.directory \
/__w/styrdokument/styrdokument
gh release create latest build/*.pdf
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .latexmkrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$pdf_mode = 1;
$pdflatex = 'lualatex -interaction=nonstopmode';
44 changes: 0 additions & 44 deletions policyer/.github/workflows/build.yml

This file was deleted.

31 changes: 0 additions & 31 deletions policyer/.github/workflows/pull_request.yml

This file was deleted.

35 changes: 0 additions & 35 deletions reglemente/.github/workflows/pull_request.yml

This file was deleted.

48 changes: 0 additions & 48 deletions reglemente/.github/workflows/push.yml

This file was deleted.

44 changes: 0 additions & 44 deletions riktlinjer/.github/workflows/build.yml

This file was deleted.

31 changes: 0 additions & 31 deletions riktlinjer/.github/workflows/pull_request.yml

This file was deleted.

43 changes: 0 additions & 43 deletions stadgar/.github/workflows/build.yml

This file was deleted.

30 changes: 0 additions & 30 deletions stadgar/.github/workflows/pull_request.yml

This file was deleted.

7 changes: 0 additions & 7 deletions stadgar/.travis-backup.yml

This file was deleted.

0 comments on commit 69ff195

Please sign in to comment.