26 lines
1.3 KiB
Bash
Executable file
26 lines
1.3 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Publish this site's tree to the running pod, letting content.nu choose the
|
|
# MINIMAL correct action from the changeset's reload class (distro.ncl ::
|
|
# reload_classes): hot → no restart · restart → snapshot + rolling restart ·
|
|
# rebuild → refused (that one needs a new image, not content).
|
|
#
|
|
# ./update-content.sh # classify + publish
|
|
# ./update-content.sh --dry-run # say what it would do, touch nothing
|
|
# ./update-content.sh --namespace x # any content.nu flag passes through
|
|
#
|
|
# Deploy identity (namespace / app_label / pvc / mount / cp_node) is resolved
|
|
# from rustelo.manifest.toml — no literals here.
|
|
#
|
|
# NOT `sync`: sync packs only the `hot` subset and never restarts, so a change
|
|
# under site/config or site/i18n/locales shipped green while the pod kept
|
|
# serving the old one.
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
CONTENT_NU="${CONTENT_NU:-$SCRIPT_DIR/../../../website-htmx-rustelo/code/provisioning/content.nu}"
|
|
|
|
[ -f "$CONTENT_NU" ] || { echo "content.nu not found: $CONTENT_NU" >&2; exit 1; }
|
|
|
|
# --since is inert while this tree is not its own git root (it lives under the
|
|
# outreach repo), so content.nu falls back to a full snapshot on every run.
|
|
exec nu "$CONTENT_NU" publish --root "$SCRIPT_DIR" "$@"
|