Develop #72
This file contains hidden or 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: build and test and deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| deploy-to-github-pages: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the code | |
| - uses: actions/checkout@v4 | |
| # Install .NET Core SDK | |
| - name: Setup .NET Core | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| # Install dotnet wasm buildtools workload | |
| - name: Install .NET WASM Build Tools | |
| run: dotnet workload install wasm-tools | |
| # Publishes Blazor project to the release-folder | |
| - name: Publish .NET Core Project | |
| run: dotnet publish -c:Release -p:GHPages=true -o dist/BeyondTheLabel --nologo | |
| - name: Rewrite base href | |
| uses: SteveSandersonMS/ghaction-rewrite-base-href@v1 | |
| with: | |
| html_path: dist/BeyondTheLabel/wwwroot/index.html | |
| base_href: /app/ | |
| - name: Commit wwwroot to GitHub Pages | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| BRANCH: gh-pages | |
| FOLDER: dist/BeyondTheLabel/wwwroot |