QUICKSTART.md had the author's personal domain as the example anchor URL (wss://waste.dev.xplwd.com/ws) which would confuse anyone reading it. Replaced with wss://YOUR_ANCHOR_DOMAIN/ws and added a new Option 3 section explaining the example scripts. Added committed *.example versions of the four local-workflow scripts (launch-tui, launch-web, deploy-web, serve-web). The real filenames are gitignored so local edits (HOST, ANCHOR, etc.) are never accidentally committed; the .example files serve as templates users copy once. Each script fails fast if the placeholder URL/host is still set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
33 lines
850 B
Bash
33 lines
850 B
Bash
#!/usr/bin/env bash
|
|
# deploy-web.sh — build and push the web UI to the VPS.
|
|
# Assumes SSH agent forwarding is set up.
|
|
#
|
|
# SETUP: copy this file to deploy-web.sh (gitignored) and set HOST below.
|
|
#
|
|
# Usage:
|
|
# ./deploy-web.sh
|
|
#
|
|
# Optional env vars:
|
|
# HOST SSH target (user@host) (required — edit below)
|
|
# REMOTE_DIR path on VPS (default: ~/waste-www)
|
|
|
|
set -euo pipefail
|
|
|
|
HOST="${HOST:-user@YOUR_VPS_IP}" # ← edit this
|
|
REMOTE_DIR="${REMOTE_DIR:-~/waste-www}"
|
|
|
|
if [[ "$HOST" == *YOUR_VPS_IP* ]]; then
|
|
echo "error: edit HOST in this script (or export HOST=user@your-vps before running)" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "→ building web UI…"
|
|
"$(dirname "$0")/build-web.sh"
|
|
|
|
echo "→ syncing to $HOST:$REMOTE_DIR"
|
|
rsync -azv --delete \
|
|
--exclude='config.js' \
|
|
web/dist/ "$HOST:$REMOTE_DIR/"
|
|
|
|
echo "✓ done"
|