Skip to content

Deploy worker

Deploy worker #69

Workflow file for this run

name: Deploy worker
on:
workflow_run:
types: [completed]
workflows: [Test worker]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
if: ${{
github.event_name == 'workflow_dispatch' ||
(github.event.workflow_run.event != 'pull_request' && github.event.workflow_run.conclusion == 'success')
}}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
secrets: |
EDGE
AUTH
ZONE
CLOUDFLARE
env:
EDGE: ${{ vars.CLOUDFLARE_WORKER_EDGE }}
ZONE: ${{ vars.CLOUDFLARE_ZONE_ID }}
CLOUDFLARE: ${{ secrets.CLOUDFLARE_API_TOKEN }}
AUTH: ${{ secrets.CLOUDFLARE_WORKER_AUTH }}