This document describes how releases and deployments are performed for the Tableau Card Engine project.
- Releases are performed automatically by GitHub Actions on every push to the main branch.
- The site is published to GitHub Pages at: https://thewizardscode.github.io/Tableau-Card-Engine/
- The release workflow runs tests and a production build; deployments are blocked if tests or the build fail.
The GitHub Actions workflow (.github/workflows/deploy.yml) runs on every push to main and performs the following steps:
- Checkout the repository and set up Node.js (Node 20).
- Install dependencies: npm ci
- Install Playwright Chromium (required for browser tests): npx playwright install chromium
- Run Monte Carlo harness (on a separate job) and upload artifacts
- Run tests: npm test (unit + browser; environment variables on main branch enable stricter Monte Carlo checks)
- Build production bundle: npm run build (vite -> dist/)
- Configure Pages, upload the dist/ directory as a Pages artifact, and deploy via actions/deploy-pages@v4
Only one deployment runs at a time; if a new push arrives while a deployment is in progress, the previous run is cancelled.
-
Browser tests require Playwright's Chromium. The workflow installs it automatically, but to reproduce locally run:
npx playwright install chromium
-
The main branch CI runs a stricter set of Monte Carlo checks (MONTE_SEEDS=200, MONTE_MIN_WIN_RATE=0.30, MONTE_MAX_WIN_RATE=0.60). To reproduce main branch CI locally:
MONTE_SEEDS=200 MONTE_MIN_WIN_RATE=0.30 MONTE_MAX_WIN_RATE=0.60 npm test
GitHub Pages serves the site at // rather than at /. The Vite config sets the base option conditionally:
- Production (npm run build): base: '/Tableau-Card-Engine/'
- Development (npm run dev): base: '/'
This is handled automatically via Vite's mode parameter in vite.config.ts. Game scenes use relative asset paths (e.g., assets/cards/card_back.svg), which resolve correctly under either base.
A repository administrator must enable GitHub Pages once via the repository settings:
- Go to Settings → Pages in the repository
- Under Source, select "GitHub Actions"
- No custom domain is needed — the default URL is used
After enabling Pages, every push to main will automatically deploy via the workflow.
- Check the Actions tab in the repository for the latest workflow run and its logs.
- Visit https://thewizardscode.github.io/Tableau-Card-Engine/ to confirm the site loads.
- Verify gameplay for the supported games and that card assets load correctly.
- Run the full test suite locally: npm test
- Reproduce main CI Monte Carlo locally if you changed game balance code: MONTE_SEEDS=200 MONTE_MIN_WIN_RATE=0.30 MONTE_MAX_WIN_RATE=0.60 npm test
- Run a production build locally: npm run build
- Ensure any changed assets are committed under public/assets/ and credited in public/assets/CREDITS.md
- Update docs if the release changes developer workflows or CI (docs/DEVELOPER.md and AGENTS.md)
npm test
MONTE_SEEDS=200 MONTE_MIN_WIN_RATE=0.30 MONTE_MAX_WIN_RATE=0.60 npm test
npm run build
npx playwright install chromium
The deploy workflow lives at: .github/workflows/deploy.yml
- Monte Carlo artifacts (from the monte-carlo job) are uploaded to the Actions artifacts for inspection.
- The build-and-deploy job uploads dist/ as a Pages artifact and calls actions/deploy-pages@v4 to publish.
I can:
- Open the deploy workflow and highlight the steps that run for a release
- Produce a compact release checklist in a PR-ready format
- Run the local test/build commands here (tell me which to run)
This repository stores the how‑to for replaying fixtures and generating thumbnails in docs/DEVELOPER.md (see the "Replay Tool" and "Game Thumbnails" sections) and the replay / thumbnail scripts in the scripts/ directory:
- Replay tool: npm run replay -- <transcript.json> (scripts/replay.ts)
- Generate thumbnail: npx tsx scripts/generate-thumbnail.ts [source-dir]
- Batch refresh thumbnails: bash scripts/refresh-thumbnails.sh
See docs/DEVELOPER.md for step‑by‑step instructions and the replay adapter registry at scripts/adapters/.
(End of RELEASE.md)