-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (36 loc) Β· 1.15 KB
/
deploy-to-ghpages.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
name: GitHub Pages CI/CD
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CONFIGURATION: Release
DOTNET_VERSION: 8.0.x
WORKING_DIRECTORY: TryAzureStaticBlazorApp
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: π Checkout
uses: actions/[email protected]
- name: β¨ Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: βοΈ Install wasm-tools
run: dotnet workload install wasm-tools
- name: π Restore
run: dotnet restore "${{ env.WORKING_DIRECTORY }}"
- name: π οΈ Build
run: dotnet build "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-restore
- name: π¦ Publish
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-build -p:GHPages=true -p:GHPagesBase="/try-deploy-blazor-wasm-app/" --output publish
- name: π Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: publish/wwwroot
force_orphan: true