Web: Fixing broken link #5
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: [ deploy ] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
jobs: | |
deploy-to-github-pages: | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Restore dependencies | |
run: dotnet restore Voxel2Pixel.Web/Voxel2Pixel.Web.csproj | |
- name: Build | |
run: dotnet build Voxel2Pixel.Web/Voxel2Pixel.Web.csproj --configuration Release --no-restore | |
- name: Publish | |
run: dotnet publish Voxel2Pixel.Web/Voxel2Pixel.Web.csproj -c Release -o release --nologo | |
- name: Change base-tag in index.html | |
run: sed -i 's/<base href="\/" \/>/<base href="\/Voxel2Pixel\/" \/>/g' release/wwwroot/index.html | |
- name: Prepare artifact | |
run: | | |
cd release/wwwroot | |
touch .nojekyll | |
ls -la | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: 'release/wwwroot' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |