diff --git a/.gitea/workflows/compile.yml b/.gitea/workflows/compile.yml new file mode 100644 index 0000000..1a3e20b --- /dev/null +++ b/.gitea/workflows/compile.yml @@ -0,0 +1,84 @@ +name: Build LaTeX Manual + +on: + push: + branches: + - main # Change to the branch you want to build + +run-name: Manual PDF - ${{ gitea.run_number }} + +jobs: + build-manual: + runs-on: ubuntu-latest + + # The compiler runs inside this container, not in the Gitea + # server container. Pin the image to a reviewed SHA-256 digest. + container: + image: texlive/texlive:latest + options: --user 1000:1000 + + steps: + - name: Check out triggering revision + uses: actions/checkout@v4 + with: + ref: ${{ gitea.sha }} + persist-credentials: false + + - name: Record toolchain and verify inputs + shell: bash + env: + BUILD_COMMIT: ${{ gitea.sha }} + BUILD_NUMBER: ${{ gitea.run_number }} + run: | + set -eu + + echo "Commit: ${BUILD_COMMIT}" + echo "Workflow run: ${BUILD_NUMBER}" + echo "Compiler environment:" + cat /etc/os-release + pdflatex --version + latexmk --version + + test -f manual.tex || { + echo "::error::Expected source manual.tex was not found." + exit 1 + } + + mkdir -p build + + cat > build/build-version.tex <