From 20c5ab3a516bfddfd33256bda2fc641826b2d668 Mon Sep 17 00:00:00 2001 From: David Houweling Date: Tue, 5 Nov 2024 10:43:25 +1100 Subject: [PATCH] add debug deploy --- .github/workflows/deploy.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index dd4db12..b5c23e1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 @@ -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