uni-tex-template/.forgejo/workflows/tex-build.yml
Jonas_Jones 30886d8e06
Some checks failed
build-latex / build (push) Failing after 4s
refined forgejo workflows
2025-06-10 18:44:25 +02:00

40 lines
1.2 KiB
YAML

name: build-latex
on: [ push, pull_request ]
jobs:
build:
runs-on: docker
steps:
- name: checkout repository
uses: https://code.forgejo.org/actions/checkout@v4
- name: restore cached LaTeX packages
uses: https://code.forgejo.org/actions/cache/restore@v4
with:
path: /var/lib/apt/lists
key: ${{ runner.os }}-texlive
- name: install LaTeX
run: |
sudo apt-get update
sudo apt-get install -y texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
- name: compile LaTeX document
run: |
pdflatex -interaction=nonstopmode main.tex
pdflatex -interaction=nonstopmode main.tex
- name: capture PDF artifact
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: main-pdf
path: main.pdf
if-no-files-found: error
- name: cache LaTeX packages
if: ${{ github.ref_name == github.event.repository.default_branch }}
uses: https://code.forgejo.org/actions/cache/save@v4
with:
path: /var/lib/apt/lists
key: ${{ runner.os }}-texlive