Fix all LaTeX warnings, small content fixes #88
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build LaTeX documents | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Fetch tags | |
shell: bash | |
run: git fetch --tags -f | |
- name: Install XeLaTeX | |
shell: bash | |
run: sudo apt-get install -y latexmk texlive-xetex texlive-science texlive-lang-german | |
- name: Build LaTeX documents | |
shell: bash | |
run: | | |
mkdir $GITHUB_WORKSPACE/latex-output | |
find . -name '*.tex' \( -exec latexmk -synctex=1 -xelatex -interaction=nonstopmode -outdir=$GITHUB_WORKSPACE/latex-output -cd "$PWD"/{} \; -o -print \) | |
- name: Deploy | |
if: ${{ github.event_name == 'push' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
TAG="nightly" | |
git tag -f "$TAG" | |
gh release delete "$TAG" || true | |
gh release create -t "Nightly PDF build" -n "This release always contains the PDFs built from the latest .tex source. It is advised to only use the latest versions for actual exams, as old versions might contain factual errors." "$TAG" | |
for file in $GITHUB_WORKSPACE/latex-output/*.pdf; do | |
echo "Delivering file $file" | |
gh release upload "$TAG" "$file" --clobber | |
done | |