|
11 | 11 |
|
12 | 12 | jobs: |
13 | 13 | build_and_deploy_job: |
14 | | - if: github.event_name == 'push' || |
| 14 | + if: github.event_name == 'push' || |
15 | 15 | (github.event_name == 'pull_request' && github.event.action != 'closed') |
16 | 16 | runs-on: ubuntu-latest |
17 | 17 | name: Build and Deploy Job |
@@ -47,27 +47,24 @@ jobs: |
47 | 47 | - name: Install WASM Tools workload |
48 | 48 | run: dotnet workload install wasm-tools |
49 | 49 |
|
50 | | - - name: Publish Blazor WebAssembly Client |
51 | | - run: dotnet publish ./Client -c Release -o build/client |
52 | | - |
53 | | - - name: Publish Azure Function API |
54 | | - run: dotnet publish ./Api -c Release -o build/api |
55 | | - |
56 | | - - name: List Published Files (optional) |
57 | | - run: ls -R build |
| 50 | + - name: Publish Blazor WebAssembly (AOT + Brotli) |
| 51 | + run: dotnet publish ./Client -c Release \ |
| 52 | + /p:BlazorWebAssemblyEnableAOT=true \ |
| 53 | + /p:CompressionEnabled=true |
58 | 54 |
|
59 | 55 | - name: Build and Deploy to Azure Static Web Apps |
60 | 56 | uses: Azure/static-web-apps-deploy@v1 |
61 | 57 | with: |
62 | 58 | azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} |
63 | | - repo_token: ${{ secrets.GITHUB_TOKEN }} |
64 | | - action: upload |
65 | | - app_location: build/client |
66 | | - api_location: build/api |
67 | | - output_location: wwwroot |
| 59 | + repo_token: ${{ secrets.GITHUB_TOKEN }} |
| 60 | + action: upload |
| 61 | + app_location: ./Client |
| 62 | + api_location: Api |
| 63 | + output_location: wwwroot |
68 | 64 |
|
69 | 65 | close_pull_request_job: |
70 | | - if: github.event_name == 'pull_request' && github.event.action == 'closed' |
| 66 | + if: github.event_name == 'pull_request' && |
| 67 | + github.event.action == 'closed' |
71 | 68 | runs-on: ubuntu-latest |
72 | 69 | name: Close Pull Request Job |
73 | 70 |
|
|
0 commit comments