Skip to content

Commit 386f742

Browse files
committed
Add GitHub Actions workflow for deploying to GitHub Pages
1 parent 4e73fba commit 386f742

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: github pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
# Checkout the code
13+
- uses: actions/checkout@v4
14+
15+
# Install .NET SDK
16+
- name: Setup .NET SDK
17+
uses: actions/setup-dotnet@v4
18+
with:
19+
dotnet-version: "10.0.x"
20+
dotnet-quality: 'preview'
21+
- name: Install .NET WebAssembly Tools
22+
run: dotnet workload install wasm-tools
23+
24+
# Publish the site
25+
- name: Publish
26+
run: dotnet publish -f net10.0 -o public
27+
28+
# Deploy the site
29+
- name: Deploy
30+
uses: peaceiris/actions-gh-pages@v4
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_dir: public/wwwroot
34+
force_orphan: true

0 commit comments

Comments
 (0)