Deploy to GitHub Pages #4
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: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Workload restore | |
run: dotnet workload restore DotnetEventViewer/DotnetEventViewer.csproj | |
- 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 wwwroot to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@3.7.1 | |
with: | |
branch: gh-pages | |
folder: publish/wwwroot |