diff --git a/.github/workflows/deploy-bundle-preview.yml b/.github/workflows/deploy-bundle-preview.yml index 69d3f7f7..d165456c 100644 --- a/.github/workflows/deploy-bundle-preview.yml +++ b/.github/workflows/deploy-bundle-preview.yml @@ -34,7 +34,7 @@ jobs: exit 1 fi } - validate_branch_name "${{ github.event.pull_request.head.ref }}" + validate_branch_name "${{ github.event.pull_request.head.ref || github.ref_name }}" - name: Extract Branch Names id: extract_branch @@ -53,7 +53,7 @@ jobs: } # Transform branch names in form of `refs/heads/main` to `main` - draft_branch=$(extract_branch "${{ github.event.pull_request.head.ref }}") + draft_branch=$(extract_branch "${{ github.event.pull_request.head.ref || github.ref_name }}") # Replace / with - in the draft branch name to use as a directory name draft_directory=$(echo "$draft_branch" | tr / -)