From 8238366e4240f65f6638d828bee1064fd71f8e20 Mon Sep 17 00:00:00 2001 From: Mark Janssen <20283+praseodym@users.noreply.github.com> Date: Fri, 19 Jul 2024 15:04:00 +0200 Subject: [PATCH] Specify correct branch name to Wrangler action The Cloudflare Wrangler action doesn't detect the branch name for `pull_request` triggers, so we have to specify it explicitly. --- .github/workflows/preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 4f31d92af..872393e76 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -42,7 +42,7 @@ jobs: with: apiToken: ${{ secrets.API_TOKEN }} accountId: ${{ secrets.ACCOUNT_ID }} - command: pages deploy dist --project-name=${{ vars.PROJECT_NAME }} + command: pages deploy dist --project-name=${{ vars.PROJECT_NAME }} --branch ${{ github.head_ref || github.ref }} --commit-hash ${GITHUB_SHA} workingDirectory: frontend - name: Upload artifact uses: actions/upload-artifact@v4