|
| 1 | +name: Compile PDFs |
| 2 | +run-name: Recompile after ${{ github.actor }}'s changes |
| 3 | +on: [push] |
| 4 | + |
| 5 | +jobs: |
| 6 | + compile-pdfs: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + container: |
| 9 | + image: texlive/texlive:latest |
| 10 | + env: |
| 11 | + TEXINPUTS: ".:..:" |
| 12 | + steps: |
| 13 | + - name: Install `gh` |
| 14 | + run: | |
| 15 | + (type -p wget >/dev/null || (apt update && apt-get install wget -y)) \ |
| 16 | + && mkdir -p -m 755 /etc/apt/keyrings \ |
| 17 | + && wget -qO- \ |
| 18 | + https://cli.github.com/packages/githubcli-archive-keyring.gpg | \ |
| 19 | + tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \ |
| 20 | + && chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \ |
| 21 | + && echo "deb [arch=$(dpkg --print-architecture) \ |
| 22 | + signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] \ |
| 23 | + https://cli.github.com/packages stable main" | \ |
| 24 | + tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ |
| 25 | + && apt update \ |
| 26 | + && apt install gh -y |
| 27 | + - name: Check out document sources |
| 28 | + uses: actions/checkout@v4 |
| 29 | + - name: Create build directory |
| 30 | + run: mkdir build |
| 31 | + - name: list |
| 32 | + run: ls |
| 33 | + - name: Compile statutes |
| 34 | + run: | |
| 35 | + latexmk -outdir=../build -cd stadgar/stadgar.tex |
| 36 | + - name: Compile regulations |
| 37 | + run: | |
| 38 | + latexmk -outdir=../build -cd reglemente/reglemente.tex |
| 39 | + - name: Compile policies |
| 40 | + run: | |
| 41 | + for filename in policyer/*.tex; do |
| 42 | + latexmk -outdir=../build -cd $filename |
| 43 | + done |
| 44 | + - name: Compile guidelines |
| 45 | + run: | |
| 46 | + for filename in riktlinjer/*.tex; do |
| 47 | + latexmk -outdir=../build -cd $filename |
| 48 | + done |
| 49 | + - name: List outputs |
| 50 | + run: ls build |
| 51 | + - name: Create release |
| 52 | + run: | |
| 53 | + git config --global --add safe.directory \ |
| 54 | + /__w/styrdokument/styrdokument |
| 55 | + gh release create latest build/*.pdf |
| 56 | + env: |
| 57 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments