Skip to content

Deploy Blazor WebAssembly to GitHub Pages #1

Deploy Blazor WebAssembly to GitHub Pages

Deploy Blazor WebAssembly to GitHub Pages #1

name: Deploy Blazor WebAssembly to GitHub Pages
on:
workflow_dispatch:
# Allows the workflow to be triggered manually
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Install dependencies and build
run: |
dotnet restore
dotnet publish -c Release -o build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/wwwroot