#!/usr/bin/env bash
# publish /tmp/space-spike/pub to the dashboard spike (private, dashboard login)
set -euo pipefail
# build_spike_space.py writes index.html only when every render and blob it links exists (--delete would wipe the last good copy)
[ -f /tmp/space-spike/pub/index.html ] || { echo 'no /tmp/space-spike/pub/index.html: build_spike_space.py failed, found 0 cards, or not run' >&2; exit 1; }
rsync -a --delete /tmp/space-spike/pub/ prod:/home/forge/adkit-gallery/spikes/spaceships-20261016/
printf 'https://dashboard.le-borgne.fr/spikes/spaceships-20261016/\n'
