Skip to content

Commit 2f17d28

Browse files
Merge branch 'main' into 23-new-function-aggregate_lineparts_sfr
2 parents 5ad0ab3 + 0fa1d14 commit 2f17d28

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/trigger_build_pkgdown_site.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,16 @@ jobs:
2424

2525
- name: Trigger Build pkgdown site
2626
run: |
27-
# Extract the branch name from the full reference
28-
BRANCH_NAME=${GITHUB_REF##*/}
27+
# Determine the branch name based on the event type
28+
if [[ "${{ github.event_name }}" == "workflow_run" ]]; then
29+
# If triggered by a workflow_run, use the head_ref from the triggering workflow
30+
BRANCH_NAME=${{ github.event.workflow_run.head_branch }}
31+
else
32+
# For other events, use the ref
33+
BRANCH_NAME=${GITHUB_REF##*/}
34+
fi
35+
36+
echo "Triggering Build pkgdown site on branch: $BRANCH_NAME"
2937
gh workflow run "Build pkgdown site" --ref "$BRANCH_NAME"
3038
env:
3139
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)