Add automated LaTeX manual build workflow
Build DevOps IT Manual / Compile LaTeX PDF (push) Failing after 0s

This commit is contained in:
2026-10-09 17:19:44 -04:00
parent 8162113127
commit d1a62286bf
6 changed files with 490 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
name: Build DevOps IT Manual
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-manual:
name: Compile LaTeX PDF
runs-on: latex-build
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Generate build metadata
shell: sh
run: |
set -eu
SHORT_SHA="$(printf '%s' "$GITHUB_SHA" | cut -c1-7)"
BUILD_ID="v1.3+build.${GITHUB_RUN_NUMBER}.${SHORT_SHA}"
cat > manual/build_metadata.tex <<EOF
\renewcommand{\BuildIdentifier}{${BUILD_ID}}
\renewcommand{\BuildCommit}{${GITHUB_SHA}}
\renewcommand{\BuildRun}{${GITHUB_RUN_NUMBER}}
\renewcommand{\BuildAttempt}{${GITHUB_RUN_ATTEMPT:-1}}
EOF
- name: Compile manual
shell: sh
run: |
set -eu
cd manual
latexmk -pdf -interaction=nonstopmode \
-halt-on-error -file-line-error main.tex
test -s main.pdf
mkdir -p dist
cp main.pdf dist/SSW590-DevOps-IT-Manual.pdf
- name: Upload PDF artifact
uses: actions/upload-artifact@v4
with:
name: SSW590-DevOps-IT-Manual
path: manual/dist/SSW590-DevOps-IT-Manual.pdf
retention-days: 14
if-no-files-found: error