mirror of
https://github.com/mskatoni/ni-mail.git
synced 2026-05-06 20:02:56 +08:00
1.9 KiB
1.9 KiB
Cloudflare Builds Checklist
This project deploys in source-first mode.
- Worker name:
ni-mail - Wrangler entrypoint:
src/index.ts - Compatibility passthrough:
worker.js - Deploy command:
npm run deploy - Build command: leave empty
- Root directory: repository root (
/or blank)
If you upload files manually to GitHub, include the entire src/ folder. The deployment will fail if wrangler.jsonc is present but src/index.ts is missing from the repository snapshot.
Required dashboard settings
In Cloudflare Dashboard for Worker ni-mail:
- Open
Settings -> Builds. - Confirm the connected GitHub repository is this project.
- Confirm the production branch is the branch that already contains
src/index.tsand the currentwrangler.jsonc. - Set
Root directoryto/or leave it blank. - Leave
Build commandempty. - Set
Deploy commandtonpm run deploy. - Save the settings.
- Retry the failed build.
Local verification
Run these commands from the repository root:
npm clean-install --progress=false
npm run check:deploy
Expected result:
- Wrangler resolves
src/index.ts - Wrangler detects the
MAILBOXDurable Object binding - Wrangler detects the
BUCKETR2 binding
After a local npm run dev or a production deploy, run:
BASE_URL=https://<your-worker-or-domain> AUTH_KEY=<your-key> MAILBOX=hello@example.com npm run smoke
Mailbox reads may return 404 until mail arrives.
If Git Builds still says src/index.ts is missing
Treat that as a stale or misbound Cloudflare Builds source configuration.
- Disconnect the GitHub repository from Worker
ni-mail. - Reconnect the same repository.
- Re-select the correct production branch.
- Re-apply the settings above.
- Trigger a fresh build with a new commit or a manual retry.
Smoke test after deploy
curl https://<your-worker>/health
Expected response:
{ "ok": true, "service": "ni-mail" }