Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af8b58f33c | ||
|
|
45cc5f747b |
@@ -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@sha256:a7ae4dfa9d521b5db14446872fa488b839021d1f604d0a3c74461784895f2a67
|
||||||
|
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 <<EOF
|
||||||
|
\newcommand{\BuildCommit}{${BUILD_COMMIT}}
|
||||||
|
\newcommand{\BuildRunNumber}{${BUILD_NUMBER}}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
- name: Compile manual
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
BUILD_COMMIT: ${{ gitea.sha }}
|
||||||
|
BUILD_NUMBER: ${{ gitea.run_number }}
|
||||||
|
run: |
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# A nonzero compiler exit status fails the job.
|
||||||
|
latexmk -pdf -halt-on-error -file-line-error \
|
||||||
|
-interaction=nonstopmode \
|
||||||
|
-outdir=build manual.tex || {
|
||||||
|
echo "::error::LaTeX compilation failed."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ ! -s build/manual.pdf ]; then
|
||||||
|
echo "::error::Compilation reported success, but build/manual.pdf is missing or empty."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "PDF created successfully:"
|
||||||
|
ls -lh build/manual.pdf
|
||||||
|
|
||||||
|
- name: Upload compiled PDF
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: manual-pdf-${{ gitea.run_number }}
|
||||||
|
path: build/manual.pdf
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 90
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
|
|
||||||
name: Compile LaTeX Manual
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-latex:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Compile LaTeX document
|
|
||||||
uses: xu-cheng/texlive-action@v3
|
|
||||||
with:
|
|
||||||
run: |
|
|
||||||
latexmk -pdf -file-line-error -halt-on-error -interaction=nonstopmode devopsIntroduction.tex
|
|
||||||
|
|
||||||
- name: Upload compiled PDF
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: devopsIntroduction-pdf
|
|
||||||
path: devopsIntroduction.pdf
|
|
||||||
if-no-files-found: error
|
|
||||||
-19
@@ -1,19 +0,0 @@
|
|||||||
FROM texlive/texlive@sha256:a7ae4dfa9d521b5db14446872fa488b839021d1f604d0a3c74461784895f2a67
|
|
||||||
|
|
||||||
USER root
|
|
||||||
|
|
||||||
# Install Node.js 20 for JavaScript-based Gitea Actions,
|
|
||||||
# along with Git and other required utilities.
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y --no-install-recommends \
|
|
||||||
ca-certificates \
|
|
||||||
curl \
|
|
||||||
git \
|
|
||||||
bash \
|
|
||||||
&& curl -fsSL https://deb.nodesource.com/setup_20.x \
|
|
||||||
-o /tmp/nodesource_setup.sh \
|
|
||||||
&& bash /tmp/nodesource_setup.sh \
|
|
||||||
&& apt-get install -y --no-install-recommends nodejs \
|
|
||||||
&& node --version \
|
|
||||||
&& git --version \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/nodesource_setup.sh
|
|
||||||
Reference in New Issue
Block a user