From 5d49d268a08e40fce561023eadf0654ffc1f0348 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Tue, 3 Oct 2023 14:33:09 -0500 Subject: [PATCH] Fix publish of playground (#7791) Same as https://github.com/astral-sh/ruff/pull/7304 Closes https://github.com/astral-sh/ruff/issues/7779 --- .github/workflows/playground.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/playground.yaml b/.github/workflows/playground.yaml index 1442a98f6c..a579c660d3 100644 --- a/.github/workflows/playground.yaml +++ b/.github/workflows/playground.yaml @@ -44,4 +44,5 @@ jobs: with: apiToken: ${{ secrets.CF_API_TOKEN }} accountId: ${{ secrets.CF_ACCOUNT_ID }} - command: pages deploy playground/dist --project-name=ruff-playground --branch ${GITHUB_HEAD_REF} --commit-hash ${GITHUB_SHA} + # `github.head_ref` is only set during pull requests and for manual runs or tags we use `main` to deploy to production + command: pages deploy playground/dist --project-name=ruff-playground --branch ${{ github.head_ref || 'main' }} --commit-hash ${GITHUB_SHA}