Update packages #54
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to GitHub Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
jobs: | |
deploy-to-github-pages: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
# https://github.com/actions/setup-dotnet#supported-version-syntax | |
dotnet-version: '8.x' | |
- name: Install .NET wasm-tools | |
run: dotnet workload install wasm-tools | |
- name: Publish | |
run: dotnet publish HnWasm/HnWasm.csproj -c Release -o release --nologo | |
- name: Change base href in index.html | |
run: sed -i 's/<base href="\/" \/>/<base href="\/hnwasm\/" \/>/g' release/wwwroot/index.html | |
- name: Copy index.html to 404.html | |
run: cp release/wwwroot/index.html release/wwwroot/404.html | |
- name: Add .nojekyll file | |
run: touch release/wwwroot/.nojekyll | |
- name: Commit wwwroot to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4.4.2 | |
with: | |
BRANCH: gh-pages | |
FOLDER: release/wwwroot |