Monorepo for browser games hosted at games.mobulum.com.
Each game is deployed to its own repo in github.com/mobulum-games with a custom subdomain.
- Phaser 3 - game framework
- Vite - build tool
- TypeScript - language
- GitHub Pages - hosting
games/
├── index.html # Root page (games.mobulum.com)
├── CNAME
├── projects/
│ ├── base/ # Template for new games
│ ├── defend-yourself/ # Example game project
│ └── .../
├── scripts/
│ └── create-project.sh # CLI to scaffold new games
└── .github/workflows/
├── deploy-root.yml # Deploys root page
└── deploy-game.yml # Deploys game dist to target repo
./scripts/create-project.sh <project-slug>Example:
./scripts/create-project.sh defend-yourselfThis will:
- Copy
projects/basetoprojects/defend-yourself - Update package name, title, and display text
- Install deps and build
- Add the game to the root page games list
- Create repo
mobulum-games/defend-yourselfon GitHub - Push dist files with CNAME
defend-yourself.games.mobulum.com
cd projects/<slug>
npm run dev # Start dev server on :3000
npm run build # Production build to dist/- Root page: auto-deploys on push to
masterwhenindex.htmlchanges - Games: auto-deploys on push to
masterwhen files inprojects/<slug>/change - Manual deploy: trigger
Deploy Gameworkflow with project slug
- Create a GitHub PAT with
reposcope and add it asDEPLOY_TOKENsecret in this repo - Enable GitHub Pages on each target repo (Settings > Pages > master branch)
- DNS:
CNAME *.games.mobulum.com -> mobulum-games.github.io