Nomad changes
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s

This commit is contained in:
Henrik Jess Nielsen
2026-06-01 23:40:55 +02:00
parent 72b1a0a6ed
commit b4c07d3693
5723 changed files with 1130655 additions and 0 deletions

61
scripts/ci/docs/build.sh Executable file
View File

@@ -0,0 +1,61 @@
#!/usr/bin/env bash
# Build the documentation site (Zensical, doc dependency group).
#
# Usage:
# scripts/ci/docs/build.sh
# scripts/ci/docs/build.sh --strict --log-file /tmp/build-log.txt
#
# Caching: use astral-sh/setup-uv with enable-cache in CI; this script only runs uv.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"
cd "$REPO_ROOT"
strict=false
log_file=""
while [[ $# -gt 0 ]]; do
case "$1" in
--strict)
strict=true
shift
;;
--log-file)
if [[ $# -lt 2 ]]; then
echo "error: --log-file requires a path" >&2
exit 2
fi
log_file="$2"
shift 2
;;
*)
echo "usage: $0 [--strict] [--log-file PATH]" >&2
exit 2
;;
esac
done
uv_sync() {
uv sync --group doc --no-editable --no-install-workspace --no-install-project
}
zensical_build() {
if [[ "$strict" == true ]]; then
uv run --no-sync zensical build --clean --strict
else
uv run --no-sync zensical build --clean
fi
}
if [[ -n "$log_file" ]]; then
set -o pipefail
mkdir -p "$(dirname "$log_file")"
: >"$log_file"
uv_sync 2>&1 | tee -a "$log_file"
zensical_build 2>&1 | tee -a "$log_file"
else
uv_sync
zensical_build
fi