Skip to content

Commit

Permalink
Update publish-to-gh-pages.yml
Browse files Browse the repository at this point in the history
#6 fix
  • Loading branch information
tesar-tech committed Aug 7, 2024
1 parent 1598e47 commit ff4ff0c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/publish-to-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ jobs:
- name: Change <base href="" /> in App.razor to match gh repo name
run: |
REPO_NAME=$(echo "${{ github.repository }}" | awk -F '/' '{print $NF}')
sed -i 's/<base href="\/" \/>/<base href="\/'$REPO_NAME'\/" \/>/g' ${{ env.WEBAPP_PATH }}Components/App.razor
USER_NAME=$(echo "${{ github.repository_owner }}")
if [ "$REPO_NAME" != "$USER_NAME.github.io" ]; then
sed -i 's/<base href="\/" \/>/<base href="\/'$REPO_NAME'\/" \/>/g' ${{ env.WEBAPP_PATH }}Components/App.razor
fi
- run: touch ${{ env.WEBAPP_PATH }}/wwwroot/.nojekyll #folder starting with _ are handled as jekyll. This file will prevent that.
- name: Run webapp and generate static files
run: |
Expand All @@ -42,4 +46,4 @@ jobs:
folder: ${{ env.WEBAPP_PATH }}output




0 comments on commit ff4ff0c

Please sign in to comment.