Experiment uri fixing #7
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: TextHub | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Publish Blazor project | |
| run: dotnet publish TextHub/TextHub.csproj -c Release -o release --nologo | |
| - name: Change base-tag in index.html from / to TextHub | |
| run: sed -i 's/<base href="\/" \/>/<base href="\/TextHub\/" \/>/g' release/wwwroot/index.html | |
| - name: Add 404.html (for GitHub Pages SPA fallback) | |
| run: cp release/wwwroot/index.html release/wwwroot/404.html | |
| - name: Add .nojekyll file | |
| run: touch release/wwwroot/.nojekyll | |
| - name: Deploy to GitHub Pages | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: gh-pages | |
| folder: release/wwwroot |