Merge pull request #69 from phmatray/renovate/fakeiteasy-9.x #55
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: Deploy Documentation to GitHub Pages | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.x' | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --configuration Release --no-restore | |
| - name: Publish Blazor WebAssembly | |
| run: dotnet publish FormCraft.DemoBlazorApp/FormCraft.DemoBlazorApp.csproj -c Release -o release --nologo | |
| - name: Change base href in index.html | |
| run: | | |
| cd release/wwwroot | |
| sed -i 's|<base href="/" />|<base href="https://phmatray.github.io/FormCraft/" />|g' index.html | |
| echo "Base href updated in index.html" | |
| grep '<base href' index.html | |
| - name: Add .nojekyll file | |
| run: touch release/wwwroot/.nojekyll | |
| - name: Create CNAME if using custom domain (optional) | |
| run: | | |
| echo "Optional: Add your custom domain here" > release/wwwroot/CNAME || true | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: release/wwwroot | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |