diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 383ba39b1d2a031a34554d70a43f9859d078e5ac..29474f243dfd02f4b88cf904917eab53e027a7de 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-# SPDX-FileCopyrightText: 2024 Philip Bergmann <philip.bergmann@uni-wuerzburg.de>
+# SPDX-FileCopyrightText: 2024-2025 Philip Bergmann <philip.bergmann@uni-wuerzburg.de>
 # SPDX-License-Identifier: CC0-1.0
 
 default:
@@ -7,10 +7,26 @@ default:
   - linux
   - docker
 
+stages:
+  - lint
+  - build
+
 # Snippet from https://reuse.software/dev/
 reuse:
+  stage: lint
   image:
     name: fsfe/reuse:latest
     entrypoint: [""]
   script:
     - reuse lint
+
+build-as-is:
+  stage: build
+  image: registry.gitlab.com/islandoftex/images/texlive:latest
+  script:
+    - "./build.sh"
+  artifacts:
+    name: "$CI_PROJECT_NAME-job$CI_JOB_ID"
+    expire_in: "5 days"
+    paths:
+      - "writeup.pdf"
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..6aad3f2c8cda08968398e0f3d1e5c6f990754dc1
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Builds the document using the 'current' documentclass configuration
+# SPDX-FileCopyrightText: 2025 Philip Bergmann <philip.bergmann@uni-wuerzburg.de>
+# SPDX-License-Identifier: CC0-1.0
+set -eu
+
+# Absolute path to $0's directory, resolving all symlinks in the path
+script_dir="$(dirname "$(readlink -f "$0")")"
+readonly script_dir
+cd -- "$script_dir"
+
+# Config: job name
+readonly default_jobname="writeup"
+readonly jobname="${jobname:-$default_jobname}"
+
+# latexmk sometimes has/had(?) problems with recognozing the source has changed
+# after a git checkout/... and therefore decidied no rebuild was needed
+# (even though it was!).
+# We solve this by always deleting the PDF before the latexmk call in build.sh
+rm -f -- "$jobname.pdf"
+
+# Increase latex max line length, this makes it easier to read the log
+# from https://tex.stackexchange.com/a/52994
+export max_print_line=1000
+export error_line=254
+export half_error_line=238
+
+# Run latexmk with the options specified in latexmkrc
+latexmk "$jobname"