Skip to content

Commit

Permalink
Merge pull request #4 from ovflowd/patch-1
Browse files Browse the repository at this point in the history
feat: single workflow
  • Loading branch information
flakey5 authored Sep 2, 2023
2 parents bf9af7e + dfb1fba commit 865279d
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
name: Deploy worker (staging)
name: Deploy Worker

on:
push:
branches:
- main
workflow_dispatch:

jobs:
deploy-staging:
deploy:
name: Deploy Cloudflare Worker
runs-on: ubuntu-latest

steps:
- name: Code checkout
uses: actions/checkout@v2
- name: Deploy
uses: cloudflare/wrangler-action@v3
- name: Git Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744

- name: Deploy to Staging
if: github.event_name == 'push'
uses: cloudflare/wrangler-action@09fc6b504568cf179b085df24393f237fea6c7f6
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
command: deploy --env staging

- name: Deploy to Production
if: github.event_name == 'workflow_dispatch'
uses: cloudflare/wrangler-action@09fc6b504568cf179b085df24393f237fea6c7f6
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
command: deploy --env prod

0 comments on commit 865279d

Please sign in to comment.