Skip to content

Commit

Permalink
Include the fork name when building versioned site
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyMcCormick committed Oct 25, 2024
1 parent c64e60f commit 739be6b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/deploy_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@ jobs:

- name: Extract branch name
shell: bash
run: echo "BRANCH_NAME=$(echo ${{ github.head_ref }} | sed 's/\//-/g')" >> $GITHUB_ENV
run: |
if [ "${{ github.event.pull_request.head.repo.fork }}" = "true" ]; then
FORK_NAME="${{ github.event.pull_request.head.repo.full_name }}"
BRANCH_NAME="${FORK_NAME}/$(echo ${{ github.head_ref }})"
else
BRANCH_NAME=$(echo ${{ github.head_ref }})
fi
BRANCH_NAME=$(echo $BRANCH_NAME | sed 's/\//-/g')
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
- name: Debug print branch name
- name: Print branch name
shell: bash
run: echo "BRANCH_NAME=${{ env.BRANCH_NAME }}"

Expand Down

0 comments on commit 739be6b

Please sign in to comment.