Skip to content

feat: v2.0 multi-backend proxy with smart routing, rate limits, and s… #11

feat: v2.0 multi-backend proxy with smart routing, rate limits, and s…

feat: v2.0 multi-backend proxy with smart routing, rate limits, and s… #11

Workflow file for this run

name: Deploy Worker
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
name: Deploy to Cloudflare Workers
runs-on: ubuntu-latest
permissions:
contents: read
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Validate Cloudflare secrets
run: |
test -n "$CLOUDFLARE_API_TOKEN" || { echo "::error::Missing repository secret: CLOUDFLARE_API_TOKEN"; exit 1; }
test -n "$CLOUDFLARE_ACCOUNT_ID" || { echo "::error::Missing repository secret: CLOUDFLARE_ACCOUNT_ID"; exit 1; }
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Type check
run: npm run typecheck
- name: Deploy with Wrangler
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ env.CLOUDFLARE_API_TOKEN }}
accountId: ${{ env.CLOUDFLARE_ACCOUNT_ID }}
command: deploy