Skip to content

Merge pull request #723 from desci-labs/sync-dispatches #32

Merge pull request #723 from desci-labs/sync-dispatches

Merge pull request #723 from desci-labs/sync-dispatches #32

name: Deploy Worker
on:
push:
paths:
- .github/workflows/deploy-sync-server.yaml
- sync-server/**
branches: # array of glob patterns matching against refs/heads. Optional; defaults to all
- main # triggers on pushes that contain changes
- develop
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
# - name: Show github ref
# run: |
# echo ${{ github.ref }}
# echo ${{ github.ref_name }}
# echo ${{ github.head_ref }}
# - name: Build & Deploy Worker (Dev)
# if: github.head_ref == 'tay/automerge-party-flagged'
# uses: cloudflare/wrangler-action@v3
# with:
# apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
# accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# environment: staging
# workingDirectory: sync-server
# wranglerVersion: 3.95.0
- name: Build & Deploy Worker (Staging)
if: github.ref == 'refs/heads/develop'
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
environment: staging
workingDirectory: sync-server
wranglerVersion: 3.95.0
- name: Build & Deploy Worker (Production)
if: github.ref == 'refs/heads/main'
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
environment: production
workingDirectory: sync-server
wranglerVersion: 3.95.0