-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (30 loc) · 890 Bytes
/
deploy.yml
File metadata and controls
40 lines (30 loc) · 890 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
38
39
40
name: Build and Deploy Blazor WebAssembly App
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup .NET 8
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Install WASM-tools
run: dotnet workload install wasm-tools
- name: Restore dependencies
run: dotnet restore
- name: Build Blazor
run: dotnet publish -c Release -o build
- name: Fix 404 Routing
run: cp build/wwwroot/index.html build/wwwroot/404.html
- name: Add CNAME file
run: echo "statistics.sus.tools" > build/wwwroot/CNAME
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/wwwroot