Skip to content

Deploy to GitHub Pages #4

Deploy to GitHub Pages

Deploy to GitHub Pages #4

Workflow file for this run

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