Retry dotnetjs boot resource; add reload hint for network startup errors #575
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: UAT Deploy (Azure Static Web Apps) | |
| on: | |
| pull_request: | |
| branches: [main] | |
| # 'closed' is intentionally omitted here — closing is handled by uat-close.yml, | |
| # which has no paths-ignore so it always runs regardless of which files changed. | |
| types: [opened, synchronize, reopened] | |
| paths-ignore: | |
| - "**.md" | |
| - "**.ps1" | |
| - ".editorconfig" | |
| - "TestFiles/**" | |
| - "Pkmds.Tests/**" | |
| - "tools/**" | |
| - "**/*.gitignore" | |
| - "**/*.gitattributes" | |
| - "**/*.yml" | |
| - "**/*.DotSettings.user" | |
| - "*.slnx" | |
| jobs: | |
| build_and_deploy: | |
| name: Build and Deploy UAT | |
| runs-on: ubuntu-latest | |
| # contents: read for checkout; pull-requests: write so the Static Web Apps | |
| # action can post/update the preview-URL comment on the PR via GITHUB_TOKEN. | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.3 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5.3.0 | |
| with: | |
| global-json-file: ./global.json | |
| - name: Install WASM workload | |
| run: dotnet workload install wasm-tools | |
| - name: Restore dependencies | |
| run: dotnet restore Pkmds.Web/Pkmds.Web.csproj | |
| - name: Publish | |
| run: dotnet publish Pkmds.Web/Pkmds.Web.csproj -c Release -o release --nologo -p:BlazorWebAssemblyEnvironment=Staging | |
| - name: Copy index.html to 404.html | |
| run: cp release/wwwroot/index.html release/wwwroot/404.html | |
| - name: Update cache version | |
| uses: datamonsters/replace-action@v2 | |
| with: | |
| files: 'release/wwwroot/service-worker.published.js' | |
| replacements: '%%CACHE_VERSION%%=${{ github.run_id }}' | |
| - name: Deploy to Azure Static Web Apps | |
| uses: Azure/static-web-apps-deploy@v1 | |
| with: | |
| azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| action: upload | |
| app_location: release/wwwroot | |
| skip_app_build: true | |
| deploy_functions: | |
| name: Deploy Azure Functions | |
| runs-on: ubuntu-latest | |
| # Least-privilege: deploys via the AZURE_CREDENTIALS secret, not GITHUB_TOKEN. | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.3 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5.3.0 | |
| with: | |
| global-json-file: ./global.json | |
| - name: Publish Functions | |
| run: dotnet publish Pkmds.Functions/Pkmds.Functions.csproj -c Release -o functions-publish --nologo | |
| - name: Zip publish output | |
| run: cd functions-publish && zip -r ../functions.zip . | |
| - name: Azure login | |
| uses: azure/login@v3 | |
| with: | |
| creds: ${{ secrets.AZURE_CREDENTIALS }} | |
| - name: Deploy to Azure Functions | |
| run: | | |
| az functionapp deployment source config-zip \ | |
| --name pkmds-functions \ | |
| --resource-group pkmds-bug-reports \ | |
| --src functions.zip | |