Add Gitea Actions manual build chapter
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
# Gitea Actions workflow for the SSW 590 DevOps IT manual.
|
||||
# The runner label must match the registered self-managed Gitea runner.
|
||||
name: manual-pdf
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-manual:
|
||||
runs-on: latex-docker
|
||||
container:
|
||||
image: texlive/texlive:TL2026-historic
|
||||
steps:
|
||||
- name: Check out source
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Generate build metadata
|
||||
shell: bash
|
||||
run: |
|
||||
set -eu
|
||||
short_sha="${GITHUB_SHA:-unknown}"
|
||||
short_sha="${short_sha:0:7}"
|
||||
run_number="${GITHUB_RUN_NUMBER:-0}"
|
||||
run_attempt="${GITHUB_RUN_ATTEMPT:-1}"
|
||||
cat > devopsBuildMetadata.tex <<EOF
|
||||
\\renewcommand{\\BuildIdentifier}{+build.${run_number}.${short_sha}}
|
||||
\\renewcommand{\\SourceRevision}{${short_sha}}
|
||||
\\renewcommand{\\WorkflowRunNumber}{${run_number}}
|
||||
\\renewcommand{\\WorkflowRunAttempt}{${run_attempt}}
|
||||
EOF
|
||||
|
||||
- name: Compile manual
|
||||
shell: bash
|
||||
run: |
|
||||
set -eu
|
||||
latexmk -norc -pdf -shell-escape -interaction=nonstopmode -halt-on-error devopsAssignment.tex
|
||||
test -s devopsAssignment.pdf
|
||||
|
||||
- name: Upload compiled PDF
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: devops-it-manual-${{ github.run_number }}-${{ github.sha }}
|
||||
path: devopsAssignment.pdf
|
||||
retention-days: 14
|
||||
Reference in New Issue
Block a user