-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (28 loc) · 1015 Bytes
/
dotnet.yml
File metadata and controls
37 lines (28 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: watchTom
on:
push:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Publish Blazor WebAssembly project
run: dotnet publish src/TomAndJerry.csproj -c Release -o release --nologo
- name: Change base-tag in index.html from / to TomAndJerry
run: sed -i 's/<base href="\/" \/>/<base href="\/TomAndJerry\/" \/>/g' release/wwwroot/index.html
- name: Add 404.html (for GitHub Pages SPA fallback)
run: cp release/wwwroot/index.html release/wwwroot/404.html
- name: Add .nojekyll file
run: touch release/wwwroot/.nojekyll
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: release/wwwroot