fix: use CLOUDFLARE_EDIT_WORKER_TOKEN in CI #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: [master] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - run: npm ci | |
| - run: npm run typecheck | |
| - run: npm test | |
| - name: Set KV namespace ID | |
| run: sed -i "s/KV_ID_PLACEHOLDER/${{ secrets.KV_ID }}/" wrangler.toml | |
| - name: Deploy | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_EDIT_WORKER_TOKEN }} | |
| command: deploy |