Skip to content

chore: refactor deployment workflow for Blazor WASM to Netlify, strea… #5

chore: refactor deployment workflow for Blazor WASM to Netlify, strea…

chore: refactor deployment workflow for Blazor WASM to Netlify, strea… #5

name: Deploy Blazor WASM to Netlify Pages
on:
push:
branches: [main]
jobs:
deploy-to-github-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Publish Blazor WASM
run: dotnet publish examples/FlowStateBlazorWasm/FlowStateBlazorWasm.csproj --configuration Release --output ./publish
- name: copy index.html to 404.html
run: cp publish/wwwroot/index.html publish/wwwroot/404.html
- name: Add .nojekyll file
run: touch publish/wwwroot/.nojekyll
- name: Add ._redirect file
run: echo "/* /index.html 200" > publish/wwwroot/_redirects
- name: Commit wwwroot to GitHub Pages
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: publish/wwwroot