Skip to content

Commit

Permalink
add debug deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhouweling committed Nov 4, 2024
1 parent 5915241 commit 20c5ab3
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,19 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'staging' }}
environment: ${{ (github.head_ref || github.ref_name) == 'main' && 'production' || 'staging' }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
timeout-minutes: 60
timeout-minutes: 10
steps:
- name: Debug github head_ref
run: echo ${{ github.head_ref }}

- name: Debug github ref_name
run: echo ${{ github.ref_name }}

- name: Debug condition
run: echo ${{ (github.head_ref || github.ref_name) == 'main' && 'production' || 'staging' }}

- name: Check out Git repository
uses: actions/checkout@v4

Expand All @@ -35,10 +44,9 @@ jobs:
- name: Build & Deploy Worker
uses: cloudflare/wrangler-action@v3
with:
wranglerVersion: 3.84.1
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'staging' }}
environment: ${{ (github.head_ref || github.ref_name) == 'main' && 'production' || 'staging' }}
vars: |
DISCORD_APP_ID
DISCORD_PUBLIC_KEY
Expand Down

0 comments on commit 20c5ab3

Please sign in to comment.