One repo, two environments. Test on staging first; monexmonad.xyz only updates when you promote to main.
| Environment | URL | Updates when |
|---|---|---|
| Staging | https://monex-staging.pages.dev/home.html(shown in Cloudflare after first deploy) |
You push to branch staging |
| Live | https://monexmonad.xyz/home.html |
You merge staging → main |
Connect Cloudflare to GitHub once. No API token changes needed.
monex-stagingstagingbash scripts/prepare-staging-site.shstaging-distAfter the first build, bookmark your staging URL (usually monex-staging.pages.dev).
| Step | What you do |
|---|---|
| 1. Develop | Commit changes on branch staging |
| 2. Auto deploy | Cloudflare Pages rebuilds staging (1–2 min) |
| 3. Test | Open staging URL → orange STAGING banner at top |
| 4. Go live | GitHub → Pull requests → staging → main → Merge |
| 5. Live site | GitHub Pages updates monexmonad.xyz |
Staging and live share the same API (monex-api). Game-only changes do not need an API redeploy.
Use dev login on staging. Deploy API manually: Actions → Deploy Cloudflare API.
main → live (GitHub Pages + monexmonad.xyz) staging → preview (Cloudflare Pages)
After each live release, sync staging from main:
GitHub → New PR → base: staging, compare: main → Merge