@@ -21,17 +21,27 @@ jobs:
2121
2222 - name : Fix for GitHub Pages
2323 run : |
24- # 1. Base Href anpassen (Achte auf das exakte Format deiner index.html)
25- # Wir nutzen hier ein flexibleres Suchmuster
26- sed -i 's|<base href=".*" />|<base href="/Blazor.SimpleGrid/" />|g' output/wwwroot/index.html
27-
28- # 2. Integritätsprüfung in der blazor.boot.json deaktivieren
29- # Das Skript entfernt alle "sha256-..." Einträge
30- sed -i 's/"sha256-[^"]*"/"sha256-ignore"/g' output/wwwroot/_framework/blazor.boot.json
24+ # 1. Base Href in der index.html anpassen
25+ # Wir suchen die index.html dynamisch, falls der Pfad leicht abweicht
26+ INDEX_PATH=$(find output/wwwroot -name "index.html")
27+ echo "Found index.html at: $INDEX_PATH"
28+ sed -i 's|<base href=".*" />|<base href="/Blazor.SimpleGrid/" />|g' "$INDEX_PATH"
29+
30+ # 2. Integritätsprüfung deaktivieren (Sucht die boot.json automatisch)
31+ # Wir suchen nach jeder .json Datei, die mit 'blazor.boot' beginnt
32+ BOOT_JSON=$(find output/wwwroot -name "blazor.boot.json")
33+
34+ if [ -f "$BOOT_JSON" ]; then
35+ echo "Found boot.json at: $BOOT_JSON - Disabling integrity..."
36+ sed -i 's/"sha256-[^"]*"/"sha256-ignore"/g' "$BOOT_JSON"
37+ else
38+ echo "Warning: blazor.boot.json not found, skipping integrity fix."
39+ # Falls die Datei nicht existiert, listen wir zur Sicherheit den Inhalt auf
40+ ls -R output/wwwroot/_framework
41+ fi
3142
3243 # 3. 404.html erstellen
33- cp output/wwwroot/index.html output/wwwroot/404.html
34-
44+ cp "$INDEX_PATH" "output/wwwroot/404.html"
3545
3646 - name : Upload to GitHub Pages
3747 uses : JamesIves/github-pages-deploy-action@v4
0 commit comments