GitHub Actions
Repository layout
.github/
workflows/
deploy-serverless-api-gateway.yml
api-config.json
wrangler.tomlExample workflow
name: Deploy Serverless API Gateway
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare gateway worker
uses: irensaltali/serverlessapigateway-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
configJson: ./api-config.json
wranglerToml: ./wrangler.toml
versionTag: v1.0.1
- name: Deploy to Cloudflare Workers
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
workingDirectory: workerLast updated