From c3f8bf9dc5d3d40658af1dfa87706e8bcba47eda Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Thu, 8 Aug 2024 10:42:45 -0400 Subject: [PATCH] Fix branch name passed to CF Pages for non-PR runs --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8bd0eaac3..c1f686265c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -89,7 +89,7 @@ jobs: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} command: pages deploy dist --project-name=jellyfin-web --branch=${{ - github.event.pull_request.head.repo.full_name == github.repository + (github.event_name != 'pull_request_target' || github.event.pull_request.head.repo.full_name == github.repository) && (github.event.pull_request.head.ref || github.ref_name) || format('{0}/{1}', github.event.pull_request.head.repo.full_name, github.event.pull_request.head.ref) }} --commit-hash=${{ github.event.pull_request.head.sha || github.sha }}