- tools/gen_music.py: pure-stdlib 8-bit synth -> music/{calm,eerie,tense,
jolly,spooky}.wav, five loop-clean mood tracks (the shop floor gets a
four-on-the-floor house groove, obviously). Engine plays them per room;
web build serves them next to the wasm.
- web/index.html: MORPQUEST page shell (EGA palette, README tab, no
account chrome).
- deploy.sh: builds the wasm via MRPGI/web/build.sh with this game baked
in and swaps it into forum-nginx:/usr/share/nginx/html/morpquest/,
right next door to /beyondmorp/.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
42 lines
1.6 KiB
Bash
Executable File
42 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# =====================================================================
|
|
# MORPQUEST — Production Deploy (next door to Beyond Morp)
|
|
# =====================================================================
|
|
# Usage: bash deploy.sh [path-to-MRPGI]
|
|
#
|
|
# 1. Builds the wasm bundle with this game baked in (MRPGI/web/build.sh)
|
|
# 2. Rsyncs web/dist to VPS staging
|
|
# 3. Replaces /usr/share/nginx/html/morpquest/ inside forum-nginx
|
|
#
|
|
# Same VPS + container as beyondmorp's deploy.sh:
|
|
# ssh humanjing@100.71.119.27 (tailscale), container forum-nginx.
|
|
# The game then lives at <forum-domain>/morpquest/ beside /beyondmorp/.
|
|
# =====================================================================
|
|
set -euo pipefail
|
|
|
|
MRPGI="${1:-$HOME/Documents/MRPGI}"
|
|
GAME="$(cd "$(dirname "$0")" && pwd)"
|
|
VPS="humanjing@100.71.119.27"
|
|
CONTAINER="forum-nginx"
|
|
REMOTE_WEB_ROOT="/usr/share/nginx/html/morpquest"
|
|
STAGING="/tmp/morpquest_deploy"
|
|
|
|
# rustup's toolchain has the wasm target; homebrew's rust does not.
|
|
RUSTUP_BIN="$HOME/.rustup/toolchains/stable-aarch64-apple-darwin/bin"
|
|
[ -d "$RUSTUP_BIN" ] && export PATH="$RUSTUP_BIN:$PATH"
|
|
|
|
echo "==> building wasm bundle ($GAME baked in)"
|
|
sh "$MRPGI/web/build.sh" "$GAME"
|
|
|
|
echo "==> rsync to VPS staging"
|
|
ssh "$VPS" "rm -rf $STAGING && mkdir -p $STAGING"
|
|
rsync -az --delete "$MRPGI/web/dist/" "$VPS:$STAGING/"
|
|
|
|
echo "==> swap into $CONTAINER:$REMOTE_WEB_ROOT"
|
|
ssh "$VPS" "
|
|
docker exec $CONTAINER rm -rf $REMOTE_WEB_ROOT
|
|
docker cp $STAGING $CONTAINER:$REMOTE_WEB_ROOT
|
|
docker exec $CONTAINER ls $REMOTE_WEB_ROOT
|
|
"
|
|
echo "==> deployed. The queue has been waiting since sunrise."
|