39 lines
1.3 KiB
YAML
39 lines
1.3 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: cmd
|
|
run: |
|
|
echo \renewcommand{\BuildIdentifier}{+build.%GITHUB_RUN_NUMBER%.%GITHUB_SHA:~0,7%}> devopsBuildMetadata.tex
|
|
echo \renewcommand{\SourceRevision}{%GITHUB_SHA:~0,7%}>> devopsBuildMetadata.tex
|
|
echo \renewcommand{\WorkflowRunNumber}{%GITHUB_RUN_NUMBER%}>> devopsBuildMetadata.tex
|
|
echo \renewcommand{\WorkflowRunAttempt}{%GITHUB_RUN_ATTEMPT%}>> devopsBuildMetadata.tex
|
|
|
|
- name: Compile manual
|
|
shell: cmd
|
|
run: |
|
|
latexmk -norc -pdf -shell-escape -interaction=nonstopmode -halt-on-error devopsAssignment.tex
|
|
if not exist devopsAssignment.pdf exit /b 1
|
|
for %%A in (devopsAssignment.pdf) do if %%~zA LEQ 0 exit /b 1
|
|
|
|
- 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
|