Repository navigation
Pin the Cloudflare account in wrangler.toml instead of a CI secret #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: DEPLOY | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - worker/** | |
| - .github/workflows/deploy.yml | |
| workflow_dispatch: | |
| # Serialize deploys so two runs cannot race each other. | |
| concurrency: | |
| group: deploy-worker | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: worker | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| cache-dependency-path: worker/package-lock.json | |
| - run: npm ci | |
| - uses: cloudflare/wrangler-action@v4 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| workingDirectory: worker |