Skip to content

Commit

Permalink
try and resolve deployment differentiation
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhouweling committed Nov 5, 2024
1 parent ef07a62 commit f6cba8f
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
name: Deploy

on:
workflow_run:
workflows: [Build]
types:
- completed
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main

env:
ENVIRONMENT: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'production' || github.event_name == 'pull_request' && 'staging' || 'manual' }}

jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'staging' }}
environment: ${{ env.ENVIRONMENT }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
timeout-minutes: 60
steps:
Expand Down Expand Up @@ -38,7 +44,7 @@ jobs:
wranglerVersion: 3.84.1
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'staging' }}
environment: ${{ env.ENVIRONMENT }}
vars: |
DISCORD_APP_ID
DISCORD_PUBLIC_KEY
Expand Down

0 comments on commit f6cba8f

Please sign in to comment.