Deploy Worker

Deploy Cloudflare Workers to production. Use when deploying main worker, search-consumer, or any Cloudflare Worker.

majiayu000 6e8c5fd 2 files · 1.2 KB Updated 567 repo stars

File contents

Cloudflare Worker Deployment

Prerequisites

  • Ensure CLOUDFLARE_API_TOKEN is set in environment
  • Verify wrangler.toml exists in worker directory

Deployment Steps

Main Worker

cd workers/main
npm run build:worker
npx wrangler deploy

Search Consumer Worker

cd workers/search-consumer
npm run build:consumer
npx wrangler deploy

Verification

After deployment, tail logs to verify:

timeout 15 npx wrangler tail

Common Issues

  • Authentication failed: Check CLOUDFLARE_API_TOKEN
  • Build errors: Run npm install first
  • Route conflicts: Check wrangler.toml routes

Rollback

If deployment fails:

npx wrangler rollback

majiayu000/claude-skill-registry-data/tree/main/devops/deploy-worker commit 6e8c5fd175

Frequently asked questions

npx skillmds add majiayu000/deploy-worker