Skip to content

Commit 726eda5

Browse files
committed
Fix Pages base path detection for user repo
1 parent bf4b721 commit 726eda5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ jobs:
3131
- name: Set base path for project pages
3232
shell: bash
3333
run: |
34-
if [[ "${{ github.repository }}" == "${{ github.repository_owner }}.github.io" ]]; then
34+
owner_lc="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')"
35+
repo_lc="$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]')"
36+
if [[ "$repo_lc" == "${owner_lc}.github.io" ]]; then
3537
echo "BASE_PATH=/" >> "$GITHUB_ENV"
3638
else
3739
echo "BASE_PATH=/${{ github.event.repository.name }}" >> "$GITHUB_ENV"

0 commit comments

Comments
 (0)