Build and deploy the site to Cloudflare Workers with pre-flight checks.
Steps
1. Pre-flight Checks
Run verification sequentially, stopping on first failure:
bun run check— TypeScript type checkingbun run test— Run all testsbun run build— Production build
If any step fails, stop and report the error with a fix suggestion. Do not proceed to deploy.
2. Deploy
If all checks pass, run:
bun run deploy
This executes astro build && wrangler deploy.
3. Report Results
After deployment completes, report:
- The Worker URL from wrangler output
- Any warnings from the build or deploy process
- Remind the user to verify the live site
If deployment fails:
- Check if wrangler is authenticated (
bunx wrangler whoami) - Check if the worker name in
wrangler.jsoncis correct - Report the specific error message