fix: don't flatten docs
Sync README to GitHub / sync (push) Successful in 12s
CI / check (push) Failing after 25s
Deploy docs / deploy (push) Canceled after 4m26s
Nightly / nightly (push) Canceled after 16s

This commit is contained in:
2026-08-07 23:31:35 -04:00
parent 28d63c14e3
commit 32e1dc1101
5 changed files with 16 additions and 30 deletions
+9 -2
View File
@@ -1,8 +1,15 @@
#!/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).
# rustdoc serves the crate under <crate>/, so the target includes that segment.
# Env: WWW_ROOT (default /srv/www), SITE_SLUG (default coursebank),
# CRATE (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
crate="${CRATE:-coursebank}"
if [ -e "$root/release/$crate/index.html" ]; then
target="release/$crate/"
else
target="nightly/$crate/"
fi
printf '%s\n' "<!doctype html><meta http-equiv=\"refresh\" content=\"0; url=${target}\">" > "$root/index.html"
echo "site root -> $target"