← back to Wallpapercanada
scripts/deploy-index.sh
19 lines
#!/usr/bin/env bash
# One-shot: push public/index.html to prod and VERIFY the DW footer link is live.
# Static file served by express.static → no restart needed. Reversible: git revert d640e43, re-run.
set -euo pipefail
cd "$(dirname "$0")/.."
PROD="${PROD_HOST:-root@45.61.58.125}"
SSH_OPTS="-o ConnectTimeout=10 -o StrictHostKeyChecking=accept-new"
REMOTE="/root/Projects/wallpapercanada/public/index.html"
rsync -az -e "ssh $SSH_OPTS" public/index.html "$PROD:$REMOTE"
echo "[deploy-index] rsync ok"
sleep 1
if curl -s --max-time 15 https://wallpapercanada.com | grep -q 'designerwallcoverings.com" target="_blank"'; then
echo "[deploy-index] VERIFIED: DW link live on https://wallpapercanada.com"
else
echo "[deploy-index] WARN: DW link not detected on live page — check manually"
fi
echo "[deploy-index] done $(date -u +%FT%TZ)"