# Deploy

> Builds and deploys the site to Cloudflare Workers with pre-flight checks including TypeScript, tests, and production build. Use when deploying, publishing, or shipping to production.

- Skill: `majiayu000/deploy-32` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/deploy-32`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/deploy-32/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/deploy-32

---


Build and deploy the site to Cloudflare Workers with pre-flight checks.

## Steps

### 1. Pre-flight Checks

Run verification sequentially, stopping on first failure:

1. `bun run check` — TypeScript type checking
2. `bun run test` — Run all tests
3. `bun 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:

```bash
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.jsonc` is correct
- Report the specific error message

