Skip to content

Commit 309449b

Browse files
author
Sebastian-Debian
committed
Wokflow für Demosite hinzugefügt.
1 parent 8609c13 commit 309449b

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/deploy-demo.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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

0 commit comments

Comments
 (0)