Add automated LaTeX build and PDF artifact
Build LaTeX Assignment / Compile and publish PDF (push) Failing after 6s

This commit is contained in:
Magdolna Nagy
2026-10-21 19:42:21 -04:00
parent 6be7a59e58
commit f9d41c720e
3 changed files with 66 additions and 7 deletions
+52 -7
View File
@@ -1,18 +1,63 @@
name: Runner smoke test
name: Build LaTeX Assignment
on:
push:
branches:
- main
workflow_dispatch:
jobs:
runner-test:
build:
name: Compile and publish PDF
runs-on: latex-docker
steps:
- name: Verify job container
- name: Check out source
uses: builtin:checkout
- name: Install Node.js in the job container
run: |
echo "Runner job started"
cat /etc/os-release
set -eu
apt-get update
apt-get install -y --no-install-recommends nodejs
node --version
rm -rf /var/lib/apt/lists/*
- name: Generate build metadata
run: |
set -eu
printf '\\renewcommand{\\BuildCommit}{%s}\n\\renewcommand{\\BuildRun}{%s}\n' \
"$(git rev-parse --short HEAD)" \
"${GITEA_RUN_ID:-${GITHUB_RUN_ID:-manual}}" \
> build-metadata.tex
cat build-metadata.tex
- name: Verify LaTeX tools
run: |
set -eu
command -v latexmk
command -v pdflatex
pdflatex --version
free -h || true
command -v pygmentize
latexmk -v
pygmentize -V
- name: Compile assignment
run: |
set -eu
latexmk -pdf \
-shell-escape \
-interaction=nonstopmode \
-halt-on-error \
devopsAssignment.tex
test -s devopsAssignment.pdf
ls -lh devopsAssignment.pdf
- name: Upload PDF artifact
uses: actions/upload-artifact@v4
with:
name: devopsAssignment-PDF
path: devopsAssignment.pdf
if-no-files-found: error
retention-days: 14