Skip to content

Commit b47efd0

Browse files
author
Sebastian-Debian
committed
Deply nochmals geändert.
1 parent ffb0268 commit b47efd0

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/deploy-demo.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,22 @@ jobs:
1818
- name: Publish Sample Project
1919
run: dotnet publish samples/Blazor.SimpleGrid.Sample/Blazor.SimpleGrid.Sample.csproj -c Release -o release
2020

21-
# WICHTIG: Korrektur für GitHub Pages Unterpfade (Base-Tag)
21+
# Wir suchen die index.html jetzt direkt im gesamten release-Ordner
2222
- name: Change base-tag in index.html
23-
run: sed -i 's/<base href="\/" \/>/<base href="\/Blazor.SimpleGrid.Sample\/" \/>/g' release/wwwroot/index.html
23+
run: |
24+
FILE_PATH=$(find release -name index.html)
25+
echo "Found index.html at: $FILE_PATH"
26+
sed -i 's/<base href="\/" \/>/<base href="\/Blazor.SimpleGrid\/" \/>/g' $FILE_PATH
2427
25-
# Fix für 404 Fehler beim Neuladen
28+
# Auch hier suchen wir die Datei dynamisch, um sie als 404.html zu kopieren
2629
- name: Copy index.html to 404.html
27-
run: cp release/wwwroot/index.html release/wwwroot/404.html
30+
run: |
31+
FILE_PATH=$(find release -name index.html)
32+
DIR_PATH=$(dirname $FILE_PATH)
33+
cp $FILE_PATH "$DIR_PATH/404.html"
2834
2935
- name: Upload to GitHub Pages
3036
uses: JamesIves/github-pages-deploy-action@v4
3137
with:
32-
folder: release/wwwroot
38+
folder: release/wwwroot # Falls dotnet publish den Ordner so erstellt
3339
branch: gh-pages

0 commit comments

Comments
 (0)