Deploy to GitHub Pages #8
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: | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install WASM tools | |
run: dotnet workload install wasm-tools | |
- name: Publish | |
run: dotnet publish DotnetEventViewer --configuration Release -o publish | |
- name: Change base href | |
run: sed -i 's/<base href="\/" \/>/<base href="\/dotnet-event-viewer\/" \/>/g' publish/wwwroot/index.html | |
# Bypass Jekyll processing to allow directories starting with underscores | |
- name: Add .nojekyll file | |
run: touch publish/wwwroot/.nojekyll | |
- name: Commit to gh-pages branch | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: publish/wwwroot |