-
Notifications
You must be signed in to change notification settings - Fork 6
42 lines (36 loc) · 1.21 KB
/
main.yml
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
41
42
name: 'Publish application'
on:
push:
branches:
- main
paths-ignore:
- '**/README.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v2
# Install .NET 8.0 SDK
- name: Setup .NET 8
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
include-prerelease: true
# Added Ahead-Of-Time workload
- name: Add AOT Workload
run: dotnet workload install wasm-tools
# Generate the website
- name: Publish
run: dotnet publish samples/KristofferStrube.Blazor.GraphEditor.WasmExample/KristofferStrube.Blazor.GraphEditor.WasmExample.csproj --configuration Release --output build
# Publish the website
- name: GitHub Pages action
if: ${{ github.ref == 'refs/heads/main' }} # Publish only when the push is on main
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.PUBLISH_TOKEN }}
publish_branch: gh-pages
publish_dir: build/wwwroot
allow_empty_commit: false
keep_files: false
force_orphan: true