Files
devops-it-manual/.gitea/workflows/manual-pdf.yml
T
reviewer fbc37e6dcd
manual-pdf / build-manual (push) Failing after 1m30s
Use Windows host runner for manual build workflow
2026-10-13 14:37:59 -04:00

48 lines
1.5 KiB
YAML

# 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: windows-latex-host
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Generate build metadata
shell: powershell
run: |
$shortSha = $env:GITHUB_SHA.Substring(0, 7)
$runNumber = $env:GITHUB_RUN_NUMBER
$runAttempt = $env:GITHUB_RUN_ATTEMPT
@"
\renewcommand{\BuildIdentifier}{+build.$runNumber.$shortSha}
\renewcommand{\SourceRevision}{$shortSha}
\renewcommand{\WorkflowRunNumber}{$runNumber}
\renewcommand{\WorkflowRunAttempt}{$runAttempt}
"@ | Set-Content -Path devopsBuildMetadata.tex -Encoding ASCII
- name: Compile manual
shell: powershell
run: |
latexmk -norc -pdf -shell-escape -interaction=nonstopmode -halt-on-error devopsAssignment.tex
if (-not (Test-Path devopsAssignment.pdf)) {
throw "Expected PDF was not produced."
}
if ((Get-Item devopsAssignment.pdf).Length -le 0) {
throw "Expected PDF is empty."
}
- 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