ci: separate docs into scripts
CI / check (push) Successful in 8m52s
Deploy docs / deploy (push) Failing after 1m50s
Nightly / nightly (push) Successful in 10m54s

This commit is contained in:
2026-08-07 16:54:59 -04:00
parent abc0bdf621
commit 717c4b412a
4 changed files with 67 additions and 34 deletions
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
# Point the site root at the latest release, falling back to nightly.
# Env: WWW_ROOT (default /srv/www), SITE_SLUG (default coursebank).
set -euo pipefail
root="${WWW_ROOT:-/srv/www}/${SITE_SLUG:-coursebank}"
if [ -e "$root/release/index.html" ]; then target="release/"; else target="nightly/"; fi
printf '%s\n' "<!doctype html><meta http-equiv=\"refresh\" content=\"0; url=${target}\">" > "$root/index.html"
echo "site root -> $target"