CLI: Deploy Frontend Pages
Deploy the core frontend apps only: apps/web and apps/admin.
1. Create Pages projects first
Section titled “1. Create Pages projects first”In Cloudflare Dashboard → Workers & Pages:
- Create a Pages project for
web - Create a Pages project for
admin
Keep the names web and admin to match environment variables and docs.
2. Deploy apps/web
Section titled “2. Deploy apps/web”apps/web uses Astro with @astrojs/cloudflare and deploys as a Worker with static assets.
cd apps/webpnpm run buildnpx wrangler deploycd ../..Or if the project uses wrangler.toml with a name that maps to a Pages project, follow the project’s deploy script.
3. Deploy apps/admin
Section titled “3. Deploy apps/admin”apps/admin uses Nuxt. Build and deploy to Cloudflare Pages:
cd apps/adminpnpm run buildnpx wrangler pages deploy .output/public --project-name=admincd ../..Or use the project’s configured deploy command (e.g. pnpm run deploy if defined).
4. Set environment variables
Section titled “4. Set environment variables”After deployment, configure Pages environment variables in Cloudflare Dashboard:
- Backend service URLs (e.g.
AUTH_SERVICE_URL,SUPPORT_SERVICE_URL, etc.) app_key(usedemofor first run)- Any other required public vars
5. SESSION binding warning
Section titled “5. SESSION binding warning”If you see a SESSION binding warning, the expected KV binding may not be configured. Check:
- Wrangler/Pages binding configuration
- Whether the target environment matches what you prepared
6. Checklist
Section titled “6. Checklist”- Both Pages projects exist
-
apps/webdeployed -
apps/admindeployed - Critical environment variables set