This commit is contained in:
parent
a6fddd0dba
commit
528bcdb210
1 changed files with 32 additions and 0 deletions
32
.forgejo/workflows/build.yaml
Normal file
32
.forgejo/workflows/build.yaml
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
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"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue