Merge pull request #66 from rbergen/dotnet8-improvements #52
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: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy-to-github-pages: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install wasm-tools for AOT compilation | |
run: dotnet workload install wasm-tools | |
- name: Publish Frontend project | |
run: dotnet publish src/Frontend/Frontend.csproj -c Release -o release --nologo | |
- name: Change base-tag in index.html from / to PrimeView | |
run: sed -i 's/<base href="\/" \/>/<base href="\/PrimeView\/" \/>/g' release/wwwroot/index.html | |
- name: Copy index.html to 404.html | |
run: cp release/wwwroot/index.html release/wwwroot/404.html | |
- name: Remove Azure static web app config | |
run: rm release/wwwroot/staticwebapp.* | |
- name: Add .nojekyll file | |
run: touch release/wwwroot/.nojekyll | |
- name: Commit wwwroot to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: pages | |
folder: release/wwwroot |