From c6dc5943f28e608e6cce70ec193819bc13224c4b Mon Sep 17 00:00:00 2001 From: Daniel McCoy Stephenson Date: Thu, 1 Oct 2026 22:57:43 -0600 Subject: [PATCH] Deploy the browser build to arcade (fishe.play.danielstephenson.dev) The first step of moving FishE off its own gateway container (RFC 0006 Migration): the same page and bundle, uploaded to arcade by pushes to main. fishe.danielstephenson.dev keeps serving from the container until the gateway aliases it to arcade at the same origin, so saves are kept. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0116e9DMUhtNXM5bHUdMhDAn --- .github/workflows/arcade.yml | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/arcade.yml diff --git a/.github/workflows/arcade.yml b/.github/workflows/arcade.yml new file mode 100644 index 0000000..4dc90f6 --- /dev/null +++ b/.github/workflows/arcade.yml @@ -0,0 +1,43 @@ +# Deploys the browser build to arcade (https://github.com/Stephenson-Software/arcade, +# RFC 0006), where it is served at https://fishe.play.danielstephenson.dev, and, +# once the gateway routes the old hostname to arcade, at +# https://fishe.danielstephenson.dev too. That is the same origin, so players' +# saves are kept. +# +# A push to main deploys once the repository variable ARCADE_ENABLED is 'true' +# (or by hand: Actions -> Run workflow). Each deploy is version.txt plus the +# commit, so every push is a new, immutable arcade version; rollback is +# arcade's POST /api/games/fishe/current. +name: Deploy to arcade + +on: + push: + branches: [ main ] + workflow_dispatch: + +permissions: + contents: read + +jobs: + deploy: + if: github.event_name == 'workflow_dispatch' || vars.ARCADE_ENABLED == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Install the game's dependencies (tak, jsonschema) + run: pip install -r requirements.txt pytest pygame + - name: Tests + run: python -m pytest -q + - name: Build the browser bundle + run: python3 web/build_zip.py + - name: Version this build (version.txt + commit) + run: echo "$(tr -d '[:space:]' < version.txt)+g${GITHUB_SHA::7}" > "$RUNNER_TEMP/arcade-version.txt" + - name: Deploy to arcade + uses: Stephenson-Software/arcade-deploy@v1 + with: + slug: fishe + token: ${{ secrets.ARCADE_TOKEN }} + version-file: ${{ runner.temp }}/arcade-version.txt