generated from forgejo-admin/template-aufgabe
32 lines
843 B
YAML
32 lines
843 B
YAML
name: Compile LaTeX
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: docker
|
|
container: texlive/texlive
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
run: |
|
|
git clone "$(echo "$GITHUB_SERVER_URL" | sed -E "s#(https?://)#\1${FORGEJO_TOKEN}@#")/${GITHUB_REPOSITORY}.git" .
|
|
|
|
- name: Compile LaTeX document
|
|
run: |
|
|
TMP="$RUNNER_TEMP/output"
|
|
cd Aufgabe
|
|
latexmk -pdf -interaction=nonstopmode -output-directory="$TMP" main.tex
|
|
mv "$TMP/main.pdf" Aufgabe.pdf
|
|
|
|
- name: Commit PDF back to repo
|
|
run: |
|
|
git config --global user.name "Forgejo Runner"
|
|
git config --global user.email "runner@localhost"
|
|
git add .
|
|
git commit -m "Automated PDF build"
|
|
git push origin "$GITHUB_REF_NAME"
|