Skip to content

Commit ef8eb3f

Browse files
committed
- Adding web-based version of Buttfish
1 parent a06cfb7 commit ef8eb3f

97 files changed

Lines changed: 66209 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy_demo.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
name: github pages
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
deploy:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Setup .NET Core
22+
uses: actions/setup-dotnet@v4
23+
with:
24+
dotnet-version: 10.x
25+
26+
- name: Install .NET WASM Build Tools
27+
run: dotnet workload install wasm-tools
28+
29+
- name: Install npm dependencies
30+
run: npm install
31+
working-directory: RonSijm.ButtFish.Web/wwwroot
32+
33+
- name: Publish Blazor WebAssembly Project
34+
run: dotnet publish RonSijm.ButtFish.Web/RonSijm.ButtFish.Web.csproj -c Release -o dist/Web --nologo
35+
36+
- name: Rewrite base href for GitHub Pages
37+
run: sed -i 's|<base href="/" />|<base href="/ButtFish/" />|g' dist/Web/wwwroot/index.html
38+
39+
- name: Copy index.html to 404.html for SPA routing
40+
run: cp dist/Web/wwwroot/index.html dist/Web/wwwroot/404.html
41+
42+
- name: Add .nojekyll file
43+
run: touch dist/Web/wwwroot/.nojekyll
44+
45+
- name: Deploy to GitHub Pages
46+
uses: JamesIves/github-pages-deploy-action@v4
47+
with:
48+
token: ${{ secrets.GITHUB_TOKEN }}
49+
branch: gh-pages
50+
folder: dist/Web/wwwroot
51+
force: true
52+
single-commit: true

RonSijm.ButtFish.Web/App.razor

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Router AppAssembly="@typeof(App).Assembly" NotFoundPage="typeof(Pages.NotFound)">
2+
<Found Context="routeData">
3+
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
4+
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
5+
</Found>
6+
</Router>

0 commit comments

Comments
 (0)