From 86e0a6a273c3500c685988df8652ef496b77df9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Tesa=C5=99?=
<33880579+tesar-tech@users.noreply.github.com>
Date: Wed, 7 Aug 2024 19:41:07 +0200
Subject: [PATCH] Update publish-to-gh-pages.yml
#6 fix
---
.github/workflows/publish-to-gh-pages.yml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/publish-to-gh-pages.yml b/.github/workflows/publish-to-gh-pages.yml
index f8b74b0..86468d1 100644
--- a/.github/workflows/publish-to-gh-pages.yml
+++ b/.github/workflows/publish-to-gh-pages.yml
@@ -30,7 +30,11 @@ jobs:
- name: Change in App.razor to match gh repo name
run: |
REPO_NAME=$(echo "${{ github.repository }}" | awk -F '/' '{print $NF}')
- sed -i 's///g' ${{ env.WEBAPP_PATH }}Components/App.razor
+ USER_NAME=$(echo "${{ github.repository_owner }}")
+ if [ "$REPO_NAME" != "$USER_NAME.github.io" ]; then
+ sed -i 's///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: |
@@ -42,4 +46,4 @@ jobs:
folder: ${{ env.WEBAPP_PATH }}output
-
\ No newline at end of file
+