-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to deploy to Github Page
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Publish | ||
run: dotnet publish --project 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/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: publish/wwwroot |