feat: add Cloudflare Workers deployment support

- Create src/worker.ts: Workers-compatible relay handler using env
  bindings instead of process.env, exports { fetch } for Workers runtime
- Update wrangler.toml: point to new src/worker.ts entry point
- Update deploy.yml: add wrangler-action deploy step after tests pass
- The worker reuses the same relay logic from src/lib/ and src/middleware/

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
MythEclipse
2026-06-10 21:38:22 +07:00
co-authored by Claude Fable 5
parent 5552ee2118
commit 7a4df35371
3 changed files with 407 additions and 6 deletions
+6
View File
@@ -13,3 +13,9 @@ jobs:
- run: bun install
- run: bun run build
- run: bun test
- name: Deploy to Cloudflare Workers
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}