How we work: test on staging first, promote to main for live. Staging workflow
| Step | What happens |
|---|---|
| 1. Apply changes | Code edits on branch staging |
| 2. Staging site | Cloudflare Pages auto-updates (free preview URL) |
| 3. Go live | Merge staging → main → monexmonad.xyz updates |
| 4. Cloudflare API | Does NOT auto-deploy — run manually when ready |
| 5. Test locally | Download ZIP → run local server → play on your PC |
After changes are on main:
https://github.com/jericddd/MonEx/archive/refs/heads/main.zip
Or: GitHub repo → Code → Download ZIP
Or: GitHub → Actions → Package test ZIP → Run workflow → download artifact (no node_modules).
cd path\to\MonEx-main\x-bot npm install npm run server
Open in browser:
http://localhost:3001/home.html http://localhost:3001/monanimal_game.html
Local server uses the same API routes as Cloudflare. For cloud API instead, set js/monex-config.js to your Worker URL.
When you are ready to push API changes live:
mainOr on your PC:
cd cloudflare\monex-api npx wrangler deploy
| Target | On push to staging | On merge to main |
|---|---|---|
| Cloudflare Pages (staging preview) | ✅ Auto (via Cloudflare Git link) | — |
| GitHub Pages (monexmonad.xyz) | — | ✅ Auto |
| Cloudflare Worker (API) | ❌ Manual | ❌ Manual |