Use correct service worker when publishing #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: .NET | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'zulu' | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Setup sonarcloud analysis | |
run: | | |
dotnet tool install --global dotnet-sonarscanner | |
dotnet sonarscanner begin \ | |
/k:"Phoenox_sidequest" /o:"phoenox" \ | |
/d:sonar.token="${{ secrets.SONAR_TOKEN }}" \ | |
/d:sonar.host.url="https://sonarcloud.io" \ | |
/d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Test with code coverage | |
run: | | |
dotnet tool install --global dotnet-coverage | |
dotnet-coverage collect "dotnet test" -f xml -o "coverage.xml" | |
- name: Publish sonarcloud report | |
run: dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" | |
- name: Install .NET WASM Build Tools | |
run: dotnet workload install wasm-tools | |
- name: Publish to release folder | |
run: dotnet publish SideQuest/SideQuest.csproj -c:Release -p:GHPages=true -o release --nologo | |
- name: Commit wwwroot to GitHub Pages | |
uses: JamesIves/[email protected] | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: release/wwwroot |