Skip to content

Commit 389f25f

Browse files
Create github-pages.yml
1 parent 7902306 commit 389f25f

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/github-pages.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: github pages
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
pull_request:
10+
branches: [ "master" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v3
21+
with:
22+
dotnet-version: 8.0.x
23+
- name: Restore dependencies
24+
run: dotnet restore
25+
- name: Install .NET WASM Build Tools
26+
run: dotnet workload install wasm-tools
27+
- name: Publish .NET Core Project
28+
run: dotnet publish BlazorWebAssemblyDemo/BlazorWebAssemblyDemo.csproj -c:Release -p:GHPages=true -o dist/Web --nologo
29+
- name: Commit wwwroot to GitHub Pages
30+
uses: JamesIves/github-pages-deploy-action@v4
31+
with:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
BRANCH: gh-pages
34+
FOLDER: dist/Web/wwwroot

0 commit comments

Comments
 (0)