Deploy to Cloudflare Workers #500
This file contains 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 to Cloudflare Workers | |
on: | |
workflow_run: | |
workflows: | |
- CI | |
types: | |
- completed | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
if: ${{ github.event_name.workflow_dispatch || github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: 📥 Checkout source | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: 📥 Install dependencies | |
run: npm ci | |
- name: 📤 Deploy to Cloudflare Workers with Wrangler | |
uses: cloudflare/wrangler-action@b2a0191ce60d21388e1a8dcc968b4e9966f938e1 # v3.11.0 | |
with: | |
accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
command: deploy |