Skip to content

Commit

Permalink
add secret to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shadrach-tayo committed Dec 21, 2024
1 parent 3b82b77 commit 2dbc024
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/deploy-sync-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:
branches: # array of glob patterns matching against refs/heads. Optional; defaults to all
- main # triggers on pushes that contain changes
- develop

env:
API_TOKEN: ${{ secrets.API_TOKEN }}
jobs:
deploy:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -37,6 +38,8 @@ jobs:
environment: staging
workingDirectory: sync-server
wranglerVersion: 3.95.0
secrets: API_TOKEN

- name: Build & Deploy Worker (Production)
if: github.ref == 'refs/heads/main'
uses: cloudflare/wrangler-action@v3
Expand All @@ -46,3 +49,4 @@ jobs:
environment: production
workingDirectory: sync-server
wranglerVersion: 3.95.0
secrets: API_TOKEN

0 comments on commit 2dbc024

Please sign in to comment.