Skip to content

Commit 67d1309

Browse files
committed
Deploy
1 parent f168792 commit 67d1309

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ] # Oder master, je nach Hauptbranch
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Setup .NET
14+
uses: actions/setup-dotnet@v4
15+
with:
16+
dotnet-version: '10.0.x' # Passe deine .NET Version an (z. B. 7.0.x, 8.0.x, 9.0.x)
17+
18+
- name: Publish App
19+
run: dotnet publish -c Release -o output
20+
21+
# Jekyll ignorieren, damit _framework Pfade geladen werden
22+
- name: Add .nojekyll file
23+
run: touch output/wwwroot/.nojekyll
24+
25+
# Base-Tag anpassen (ersetze REPOSITORY_NAME mit deinem GitHub Repo Namen)
26+
- name: Fix base path
27+
run: |
28+
sed -i 's///g' output/wwwroot/index.html
29+
30+
# 404 Fallback für Client-Side Routing
31+
- name: Copy index.html to 404.html
32+
run: cp output/wwwroot/index.html output/wwwroot/404.html
33+
34+
- name: Deploy to GitHub Pages
35+
uses: JamesIves/github-pages-deploy-action@v4
36+
with:
37+
folder: output/wwwroot
38+
branch: gh-pages

0 commit comments

Comments
 (0)