File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy Demo to GitHub Pages
2+
3+ on :
4+ push :
5+ branches : [ main ] # Oder dein primärer Branch-Name
6+
7+ jobs :
8+ deploy :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v3
12+
13+ - name : Setup .NET
14+ uses : actions/setup-dotnet@v3
15+ with :
16+ dotnet-version : 10.0.x # Dotnet version anpassen
17+
18+ - name : Publish Sample Project
19+ run : dotnet publish samples/Blazor.SimpleGrid.Sample/Blazor.SimpleGrid.Sample.csproj -c Release -o release
20+
21+ # WICHTIG: Korrektur für GitHub Pages Unterpfade (Base-Tag)
22+ - name : Change base-tag in index.html
23+ run : sed -i 's/<base href="\/" \/>/<base href="\/Blazor.SimpleGrid\/" \/>/g' release/wwwroot/index.html
24+
25+ # Fix für 404 Fehler beim Neuladen
26+ - name : Copy index.html to 404.html
27+ run : cp release/wwwroot/index.html release/wwwroot/404.html
28+
29+ - name : Upload to GitHub Pages
30+ uses : JamesIves/github-pages-deploy-action@v4
31+ with :
32+ folder : release/wwwroot
33+ branch : gh-pages
You can’t perform that action at this time.
0 commit comments