Skip to content

Deploy Blazor WebAssembly to GitHub Pages #2

Deploy Blazor WebAssembly to GitHub Pages

Deploy Blazor WebAssembly to GitHub Pages #2

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 source/FlightScanner.Client.BlazorWA
dotnet publish -c Release -o build source/FlightScanner.Client.BlazorWA
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/wwwroot