This GitHub Action publishes and deploys a Blazor WebAssembly project in your repository to your GitHub Pages through the gh-pages
branch. It can be seen used in the blazor-pwa-on-gh-pages
sample.
This automatically performs all the required setup, including adding the .nojekyll
file and a 404.html
page redirection workaround which is necessary in order for single-page applications to work in GitHub Pages.
This is based on Steve Sanderson's BlazorOnGitHubPages
example.
- uses: proulxsamuel/deploy-blazor-to-gh-pages@master
with:
# The path to the Blazor project in the repository.
# Default: '.'
project_path: ''
This requires you to enable GitHub Pages in your repository settings and to checkout the repository through actions/checkout
first.
You can see a workflow example here.