From 20cca7bb388da7b083157364e8fb081640c1e46d Mon Sep 17 00:00:00 2001 From: Chandradev Date: Sat, 5 Jul 2025 22:42:38 +0530 Subject: [PATCH 01/73] ci: add Azure Static Web Apps workflow file on-behalf-of: @Azure opensource@microsoft.com --- ...static-web-apps-orange-water-0badfae10.yml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/azure-static-web-apps-orange-water-0badfae10.yml diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml new file mode 100644 index 0000000..57aadcc --- /dev/null +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -0,0 +1,46 @@ +name: Azure Static Web Apps CI/CD + +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened, closed] + branches: + - main + +jobs: + build_and_deploy_job: + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') + runs-on: ubuntu-latest + name: Build and Deploy Job + steps: + - uses: actions/checkout@v3 + with: + submodules: true + lfs: false + - name: Build And Deploy + id: builddeploy + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} + repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + action: "upload" + ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### + # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig + app_location: "./Client" # App source code path + api_location: "Api" # Api source code path - optional + output_location: "wwwroot" # Built app content directory - optional + ###### End of Repository/Build Configurations ###### + + close_pull_request_job: + if: github.event_name == 'pull_request' && github.event.action == 'closed' + runs-on: ubuntu-latest + name: Close Pull Request Job + steps: + - name: Close Pull Request + id: closepullrequest + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} + action: "close" From e1d7c6d5608067ddde793f64311ffe798e8be094 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Sun, 6 Jul 2025 19:52:27 +0530 Subject: [PATCH 02/73] PWA features Added. --- .../WeatherForecastFunction.cs | 2 +- Client/wwwroot/index.html | 4 ++ Client/wwwroot/manifest.webmanifest | 22 ++++++++ Client/wwwroot/service-worker.js | 4 ++ Client/wwwroot/service-worker.published.js | 55 +++++++++++++++++++ 5 files changed, 86 insertions(+), 1 deletion(-) rename Api/{ => Functions}/WeatherForecastFunction.cs (98%) create mode 100644 Client/wwwroot/manifest.webmanifest create mode 100644 Client/wwwroot/service-worker.js create mode 100644 Client/wwwroot/service-worker.published.js diff --git a/Api/WeatherForecastFunction.cs b/Api/Functions/WeatherForecastFunction.cs similarity index 98% rename from Api/WeatherForecastFunction.cs rename to Api/Functions/WeatherForecastFunction.cs index 706badb..2875c93 100644 --- a/Api/WeatherForecastFunction.cs +++ b/Api/Functions/WeatherForecastFunction.cs @@ -4,7 +4,7 @@ using Microsoft.Azure.Functions.Worker.Http; using Microsoft.Extensions.Logging; -namespace Api +namespace Api.Functions { public class HttpTrigger { diff --git a/Client/wwwroot/index.html b/Client/wwwroot/index.html index efc9613..f5ad03f 100644 --- a/Client/wwwroot/index.html +++ b/Client/wwwroot/index.html @@ -10,6 +10,9 @@ + + + @@ -27,6 +30,7 @@ πŸ—™ + diff --git a/Client/wwwroot/manifest.webmanifest b/Client/wwwroot/manifest.webmanifest new file mode 100644 index 0000000..00ba795 --- /dev/null +++ b/Client/wwwroot/manifest.webmanifest @@ -0,0 +1,22 @@ +{ + "name": "BlazorApp15", + "short_name": "BlazorApp15", + "id": "./", + "start_url": "./", + "display": "standalone", + "background_color": "#ffffff", + "theme_color": "#03173d", + "prefer_related_applications": false, + "icons": [ + { + "src": "icon-512.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "icon-192.png", + "type": "image/png", + "sizes": "192x192" + } + ] +} diff --git a/Client/wwwroot/service-worker.js b/Client/wwwroot/service-worker.js new file mode 100644 index 0000000..fe614da --- /dev/null +++ b/Client/wwwroot/service-worker.js @@ -0,0 +1,4 @@ +// In development, always fetch from the network and do not enable offline support. +// This is because caching would make development more difficult (changes would not +// be reflected on the first load after each change). +self.addEventListener('fetch', () => { }); diff --git a/Client/wwwroot/service-worker.published.js b/Client/wwwroot/service-worker.published.js new file mode 100644 index 0000000..1f7f543 --- /dev/null +++ b/Client/wwwroot/service-worker.published.js @@ -0,0 +1,55 @@ +// Caution! Be sure you understand the caveats before publishing an application with +// offline support. See https://aka.ms/blazor-offline-considerations + +self.importScripts('./service-worker-assets.js'); +self.addEventListener('install', event => event.waitUntil(onInstall(event))); +self.addEventListener('activate', event => event.waitUntil(onActivate(event))); +self.addEventListener('fetch', event => event.respondWith(onFetch(event))); + +const cacheNamePrefix = 'offline-cache-'; +const cacheName = `${cacheNamePrefix}${self.assetsManifest.version}`; +const offlineAssetsInclude = [ /\.dll$/, /\.pdb$/, /\.wasm/, /\.html/, /\.js$/, /\.json$/, /\.css$/, /\.woff$/, /\.png$/, /\.jpe?g$/, /\.gif$/, /\.ico$/, /\.blat$/, /\.dat$/ ]; +const offlineAssetsExclude = [ /^service-worker\.js$/ ]; + +// Replace with your base path if you are hosting on a subfolder. Ensure there is a trailing '/'. +const base = "/"; +const baseUrl = new URL(base, self.origin); +const manifestUrlList = self.assetsManifest.assets.map(asset => new URL(asset.url, baseUrl).href); + +async function onInstall(event) { + console.info('Service worker: Install'); + + // Fetch and cache all matching items from the assets manifest + const assetsRequests = self.assetsManifest.assets + .filter(asset => offlineAssetsInclude.some(pattern => pattern.test(asset.url))) + .filter(asset => !offlineAssetsExclude.some(pattern => pattern.test(asset.url))) + .map(asset => new Request(asset.url, { integrity: asset.hash, cache: 'no-cache' })); + await caches.open(cacheName).then(cache => cache.addAll(assetsRequests)); +} + +async function onActivate(event) { + console.info('Service worker: Activate'); + + // Delete unused caches + const cacheKeys = await caches.keys(); + await Promise.all(cacheKeys + .filter(key => key.startsWith(cacheNamePrefix) && key !== cacheName) + .map(key => caches.delete(key))); +} + +async function onFetch(event) { + let cachedResponse = null; + if (event.request.method === 'GET') { + // For all navigation requests, try to serve index.html from cache, + // unless that request is for an offline resource. + // If you need some URLs to be server-rendered, edit the following check to exclude those URLs + const shouldServeIndexHtml = event.request.mode === 'navigate' + && !manifestUrlList.some(url => url === event.request.url); + + const request = shouldServeIndexHtml ? 'index.html' : event.request; + const cache = await caches.open(cacheName); + cachedResponse = await cache.match(request); + } + + return cachedResponse || fetch(event.request); +} From eb0e2c4ef52652e876a5f16a18b60d38791b58d3 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Sun, 6 Jul 2025 20:15:20 +0530 Subject: [PATCH 03/73] Home Page. --- Client/Pages/Home.razor | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Client/Pages/Home.razor b/Client/Pages/Home.razor index dfcdf75..b60adb9 100644 --- a/Client/Pages/Home.razor +++ b/Client/Pages/Home.razor @@ -2,6 +2,4 @@ Home -

Hello, world!

- -Welcome to your new app. \ No newline at end of file +

Welcome to Bill Me App.

From 7b485e938b3d026ac6613b7cfd84874ff1740a3e Mon Sep 17 00:00:00 2001 From: Chandradev Date: Sun, 6 Jul 2025 21:59:38 +0530 Subject: [PATCH 04/73] Update README.md --- README.md | 66 +------------------------------------------------------ 1 file changed, 1 insertion(+), 65 deletions(-) diff --git a/README.md b/README.md index f739d39..fa811de 100644 --- a/README.md +++ b/README.md @@ -1,65 +1 @@ -# Blazor Starter Application - -This template contains an example .NET 8 [Blazor WebAssembly](https://docs.microsoft.com/aspnet/core/blazor/?view=aspnetcore-6.0#blazor-webassembly) client application, a .NET 8 C# [Azure Functions](https://docs.microsoft.com/azure/azure-functions/functions-overview), and a C# class library with shared code. - -## Getting Started - -1. Create a repository from the [GitHub template](https://docs.github.com/en/enterprise/2.22/user/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template) and then clone it locally to your machine. - -1. In the **Api** folder, copy `local.settings.example.json` to `local.settings.json` - -1. Continue using either Visual Studio or Visual Studio Code. - -### Visual Studio 2022 - -Once you clone the project, open the solution in the latest release of [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) with the Azure workload installed, and follow these steps: - -1. Right-click on the solution and select **Configure Startup Projects...**. - -1. Select **Multiple startup projects** and set the following actions for each project: - - *Api* - **Start** - - *Client* - **Start** - - *Shared* - None - -1. Press **F5** to launch both the client application and the Functions API app. - -### Visual Studio Code with Azure Static Web Apps CLI for a better development experience (Optional) - -1. Install (or update) the [Azure Static Web Apps CLI](https://www.npmjs.com/package/@azure/static-web-apps-cli) and [Azure Functions Core Tools CLI](https://www.npmjs.com/package/azure-functions-core-tools). - -1. Open the folder in Visual Studio Code. - -1. Delete file `Client/wwwroot/appsettings.Development.json` - -1. In the VS Code terminal, run the following command to start the Static Web Apps CLI, along with the Blazor WebAssembly client application and the Functions API app: - - In the Client folder, run: - ```bash - dotnet run - ``` - - In the API folder, run: - ```bash - func start - ``` - - In another terminal, run: - ```bash - swa start http://localhost:5000 --api-location http://localhost:7071 - ``` - - The Static Web Apps CLI (`swa`) starts a proxy on port 4280 that will forward static site requests to the Blazor server on port 5000 and requests to the `/api` endpoint to the Functions server. - -1. Open a browser and navigate to the Static Web Apps CLI's address at `http://localhost:4280`. You'll be able to access both the client application and the Functions API app in this single address. When you navigate to the "Fetch Data" page, you'll see the data returned by the Functions API app. - -1. Enter Ctrl-C to stop the Static Web Apps CLI. - -## Template Structure - -- **Client**: The Blazor WebAssembly sample application -- **Api**: A C# Azure Functions API, which the Blazor application will call -- **Shared**: A C# class library with a shared data model between the Blazor and Functions application - -## Deploy to Azure Static Web Apps - -This application can be deployed to [Azure Static Web Apps](https://docs.microsoft.com/azure/static-web-apps), to learn how, check out [our quickstart guide](https://aka.ms/blazor-swa/quickstart). +This is Bill Me App. From c27d5bcdecbcd1a01e49684446edd4de66be49d3 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Sun, 6 Jul 2025 22:10:19 +0530 Subject: [PATCH 05/73] Pwa name updated --- Client/wwwroot/manifest.webmanifest | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Client/wwwroot/manifest.webmanifest b/Client/wwwroot/manifest.webmanifest index 00ba795..96edfce 100644 --- a/Client/wwwroot/manifest.webmanifest +++ b/Client/wwwroot/manifest.webmanifest @@ -1,6 +1,6 @@ { - "name": "BlazorApp15", - "short_name": "BlazorApp15", + "name": "BillMeApp", + "short_name": "BillMeApp", "id": "./", "start_url": "./", "display": "standalone", From 86520da61ae06592b660b89d4b0d5c04399969a1 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Mon, 7 Jul 2025 09:37:45 +0530 Subject: [PATCH 06/73] Optimization Flags added --- Client/Client.csproj | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Client/Client.csproj b/Client/Client.csproj index 2578370..2f446ad 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -4,7 +4,15 @@ net8.0 enable enable - BlazorApp.Client + BlazorApp.Client + + + true + true + true + true + true + none @@ -12,9 +20,8 @@ - - + From 25dd1b6e998c56c2a328f8be7a38adebe186c1cf Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Mon, 7 Jul 2025 10:10:53 +0530 Subject: [PATCH 07/73] AOT removed. --- Client/Client.csproj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Client/Client.csproj b/Client/Client.csproj index 2f446ad..b4743cb 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -7,10 +7,9 @@ BlazorApp.Client - true + true true - true true none From 457bcb935c466e25ff4674069b41dad829987245 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Mon, 7 Jul 2025 10:17:41 +0530 Subject: [PATCH 08/73] Code optimization --- Client/Client.csproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Client/Client.csproj b/Client/Client.csproj index b4743cb..5023c68 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -11,6 +11,8 @@ true true true + false + false none From 3261b07b5e915f9bafc81cee6a81a4aefd3fbf2c Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Mon, 7 Jul 2025 10:32:40 +0530 Subject: [PATCH 09/73] Code Optimization --- Client/staticwebapp.config.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Client/staticwebapp.config.json b/Client/staticwebapp.config.json index 4a1bb1f..9be612a 100644 --- a/Client/staticwebapp.config.json +++ b/Client/staticwebapp.config.json @@ -1,5 +1,12 @@ { - "navigationFallback": { - "rewrite": "/index.html" + "navigationFallback": { + "rewrite": "index.html" + }, + "responseOverrides": { + "/_framework": { + "headers": { + "Content-Encoding": "br" + } } -} \ No newline at end of file + } +} From c2e3677227b44a099c2235a0e38e6320f7543daa Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Mon, 7 Jul 2025 10:51:12 +0530 Subject: [PATCH 10/73] Code reverted back --- Client/staticwebapp.config.json | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Client/staticwebapp.config.json b/Client/staticwebapp.config.json index 9be612a..e094983 100644 --- a/Client/staticwebapp.config.json +++ b/Client/staticwebapp.config.json @@ -1,12 +1,5 @@ { "navigationFallback": { - "rewrite": "index.html" - }, - "responseOverrides": { - "/_framework": { - "headers": { - "Content-Encoding": "br" - } - } + "rewrite": "/index.html" } } From 480bccd6caf29d7b766e66e766c11da0d7e1d9e5 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Mon, 7 Jul 2025 11:38:28 +0530 Subject: [PATCH 11/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 37 +++++++++++++------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 57aadcc..806b55c 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -15,31 +15,44 @@ jobs: runs-on: ubuntu-latest name: Build and Deploy Job steps: - - uses: actions/checkout@v3 + - name: Checkout Code + uses: actions/checkout@v3 with: submodules: true lfs: false - - name: Build And Deploy - id: builddeploy + + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.0.x' + + - name: Restore Dependencies + run: dotnet restore ./Client/Client.csproj + + - name: Publish Blazor App with Brotli & Trimming + run: | + dotnet publish ./Client/Client.csproj \ + -c Release \ + -o build \ + -p:BlazorWebAssemblyEnableCompression=true \ + -p:PublishTrimmed=true + + - name: Deploy to Azure Static Web App uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + repo_token: ${{ secrets.GITHUB_TOKEN }} action: "upload" - ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### - # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig - app_location: "./Client" # App source code path - api_location: "Api" # Api source code path - optional - output_location: "wwwroot" # Built app content directory - optional - ###### End of Repository/Build Configurations ###### + app_location: "." # Root path β€” not used when using `output_location` + api_location: "Api" # Optional: Azure Function App folder (if any) + output_location: "build/wwwroot" # Pointing to the manually published output close_pull_request_job: if: github.event_name == 'pull_request' && github.event.action == 'closed' runs-on: ubuntu-latest name: Close Pull Request Job steps: - - name: Close Pull Request - id: closepullrequest + - name: Close Pull Request Preview uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} From d249c3b6977dbb299c1edd7fb296bda35f23ce26 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Mon, 7 Jul 2025 13:33:20 +0530 Subject: [PATCH 12/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 45 +++++-------------- 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 806b55c..d705cdc 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -4,56 +4,33 @@ on: push: branches: - main - pull_request: - types: [opened, synchronize, reopened, closed] - branches: - - main + # Pull request events are removed to avoid extra staging environments jobs: build_and_deploy_job: - if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest name: Build and Deploy Job steps: - - name: Checkout Code + - name: πŸ“¦ Checkout Code uses: actions/checkout@v3 with: submodules: true lfs: false - - name: Setup .NET + - name: πŸ”§ Setup .NET Core SDK uses: actions/setup-dotnet@v3 with: - dotnet-version: '8.0.x' - - - name: Restore Dependencies - run: dotnet restore ./Client/Client.csproj + dotnet-version: '8.x' - - name: Publish Blazor App with Brotli & Trimming - run: | - dotnet publish ./Client/Client.csproj \ - -c Release \ - -o build \ - -p:BlazorWebAssemblyEnableCompression=true \ - -p:PublishTrimmed=true + - name: πŸ› οΈ Publish Blazor WASM App + run: dotnet publish ./Client/Client.csproj --configuration Release --output ./publish - - name: Deploy to Azure Static Web App + - 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_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} + repo_token: ${{ secrets.GITHUB_TOKEN }} # For PR comment integration action: "upload" - app_location: "." # Root path β€” not used when using `output_location` - api_location: "Api" # Optional: Azure Function App folder (if any) - output_location: "build/wwwroot" # Pointing to the manually published output - - close_pull_request_job: - if: github.event_name == 'pull_request' && github.event.action == 'closed' - runs-on: ubuntu-latest - name: Close Pull Request Job - steps: - - name: Close Pull Request Preview - uses: Azure/static-web-apps-deploy@v1 - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} - action: "close" + app_location: "./publish/wwwroot" # Where published files are located + api_location: "Api" # Optional - skip or update if unused + output_location: "" # Not needed when using pre-built app From d9bd561d07f0d177ad98efde9c64b67ba94bf115 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Mon, 7 Jul 2025 13:38:49 +0530 Subject: [PATCH 13/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 42 ++++++++++++------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index d705cdc..57aadcc 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -4,33 +4,43 @@ on: push: branches: - main - # Pull request events are removed to avoid extra staging environments + pull_request: + types: [opened, synchronize, reopened, closed] + branches: + - main jobs: build_and_deploy_job: + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest name: Build and Deploy Job steps: - - name: πŸ“¦ Checkout Code - uses: actions/checkout@v3 + - uses: actions/checkout@v3 with: submodules: true lfs: false - - - name: πŸ”§ Setup .NET Core SDK - uses: actions/setup-dotnet@v3 + - name: Build And Deploy + id: builddeploy + uses: Azure/static-web-apps-deploy@v1 with: - dotnet-version: '8.x' - - - name: πŸ› οΈ Publish Blazor WASM App - run: dotnet publish ./Client/Client.csproj --configuration Release --output ./publish + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} + repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + action: "upload" + ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### + # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig + app_location: "./Client" # App source code path + api_location: "Api" # Api source code path - optional + output_location: "wwwroot" # Built app content directory - optional + ###### End of Repository/Build Configurations ###### - - name: πŸš€ Deploy to Azure Static Web Apps + close_pull_request_job: + if: github.event_name == 'pull_request' && github.event.action == 'closed' + runs-on: ubuntu-latest + name: Close Pull Request Job + steps: + - name: Close Pull Request + id: closepullrequest uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} # For PR comment integration - action: "upload" - app_location: "./publish/wwwroot" # Where published files are located - api_location: "Api" # Optional - skip or update if unused - output_location: "" # Not needed when using pre-built app + action: "close" From 9c53034c8004d7320d96b313970b05939994db40 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Mon, 7 Jul 2025 13:56:45 +0530 Subject: [PATCH 14/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 57aadcc..d8d460c 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -15,31 +15,38 @@ jobs: runs-on: ubuntu-latest name: Build and Deploy Job steps: - - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v3 with: submodules: true lfs: false - - name: Build And Deploy - id: builddeploy + + - name: Cache NuGet packages + uses: actions/cache@v3 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} + restore-keys: ${{ runner.os }}-nuget- + + - name: Publish Blazor WebAssembly (Optional AOT) + run: dotnet publish ./Client -c Release + + - name: Build And 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_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + repo_token: ${{ secrets.GITHUB_TOKEN }} action: "upload" - ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### - # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig - app_location: "./Client" # App source code path - api_location: "Api" # Api source code path - optional - output_location: "wwwroot" # Built app content directory - optional - ###### End of Repository/Build Configurations ###### + app_location: "./Client" + api_location: "Api" + output_location: "wwwroot" close_pull_request_job: if: github.event_name == 'pull_request' && github.event.action == 'closed' runs-on: ubuntu-latest name: Close Pull Request Job steps: - - name: Close Pull Request - id: closepullrequest + - name: Close Pull Request Preview Environment uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} From b071222e7d45309d98b4e12c734a7a645b546079 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Tue, 8 Jul 2025 10:24:05 +0530 Subject: [PATCH 15/73] CompressionEnabled done --- Client/Client.csproj | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Client/Client.csproj b/Client/Client.csproj index 5023c68..69e5941 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -6,14 +6,19 @@ enable BlazorApp.Client - + true true true false false + false + partial + true none + + From 6fb0b4600e9874524ffbc70a954dd221c03611db Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Tue, 8 Jul 2025 10:29:50 +0530 Subject: [PATCH 16/73] Code Optimization --- Client/Client.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/Client/Client.csproj b/Client/Client.csproj index 69e5941..e6a562f 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -18,7 +18,6 @@ true none - From a374114a50002e737c848df8af0541163963207d Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Tue, 8 Jul 2025 11:43:58 +0530 Subject: [PATCH 17/73] Code Test --- Client/staticwebapp.config.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Client/staticwebapp.config.json b/Client/staticwebapp.config.json index e094983..b268ce5 100644 --- a/Client/staticwebapp.config.json +++ b/Client/staticwebapp.config.json @@ -1,5 +1,12 @@ { + "$schema": "https://aka.ms/swa/v2/schemas/staticwebapp.config.json", + + "mimeTypes": { + ".br": "application/octet-stream" + }, + "navigationFallback": { - "rewrite": "/index.html" + "rewrite": "index.html", + "exclude": [ "/_framework/*", "/api/*" ] } } From 9e17ae064459ae3949be5ba71001a34b8c13b068 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Tue, 8 Jul 2025 11:45:23 +0530 Subject: [PATCH 18/73] test --- Client/staticwebapp.config.json | 1 + 1 file changed, 1 insertion(+) diff --git a/Client/staticwebapp.config.json b/Client/staticwebapp.config.json index b268ce5..89c1a96 100644 --- a/Client/staticwebapp.config.json +++ b/Client/staticwebapp.config.json @@ -9,4 +9,5 @@ "rewrite": "index.html", "exclude": [ "/_framework/*", "/api/*" ] } + } From 3905444dc5469e48195252775d0291558ecf86c4 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Tue, 8 Jul 2025 11:57:40 +0530 Subject: [PATCH 19/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 50 ++++++++++++++----- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index d8d460c..269b80a 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -11,9 +11,11 @@ on: jobs: build_and_deploy_job: - if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') + if: github.event_name == 'push' || + (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest name: Build and Deploy Job + steps: - name: Checkout repository uses: actions/checkout@v3 @@ -21,33 +23,55 @@ jobs: submodules: true lfs: false + - name: Setup .NET SDK + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.0.x' + - name: Cache NuGet packages uses: actions/cache@v3 with: path: ~/.nuget/packages key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} - restore-keys: ${{ runner.os }}-nuget- + restore-keys: | + ${{ runner.os }}-nuget- + + - name: Cache .NET Workload Packs + uses: actions/cache@v3 + with: + path: ~/.dotnet + key: ${{ runner.os }}-dotnet-workloads-${{ hashFiles('**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-dotnet-workloads- - - name: Publish Blazor WebAssembly (Optional AOT) - run: dotnet publish ./Client -c Release + - name: Install WASM Tools workload + run: dotnet workload install wasm-tools - - name: Build And Deploy to Azure Static Web Apps + - name: Publish Blazor WebAssembly (AOT + Brotli) + run: dotnet publish ./Client \ + -c Release \ + /p:RunAOTCompilation=true \ + /p:CompressionEnabled=true + + - name: Build and 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_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: "upload" - app_location: "./Client" - api_location: "Api" - output_location: "wwwroot" + repo_token: ${{ secrets.GITHUB_TOKEN }} + action: upload + app_location: ./Client + api_location: Api + output_location: wwwroot close_pull_request_job: - if: github.event_name == 'pull_request' && github.event.action == 'closed' + if: github.event_name == 'pull_request' && + github.event.action == 'closed' runs-on: ubuntu-latest name: Close Pull Request Job + steps: - - name: Close Pull Request Preview Environment + - name: Close Preview uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} - action: "close" + action: close From c60a93a457b5a9b1c8ee78260398eb136f6ba833 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Tue, 8 Jul 2025 11:57:59 +0530 Subject: [PATCH 20/73] Code updated. --- Client/Client.csproj | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Client/Client.csproj b/Client/Client.csproj index e6a562f..1034042 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -5,9 +5,11 @@ enable enable BlazorApp.Client + + - + true true true true @@ -19,7 +21,7 @@ none - + @@ -28,5 +30,4 @@ - From 2f39fe529e109b3eaa52b108ff39e60fa17a33a8 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Tue, 8 Jul 2025 12:02:57 +0530 Subject: [PATCH 21/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 41 ++++++------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 269b80a..3ada28b 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -15,7 +15,6 @@ jobs: (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest name: Build and Deploy Job - steps: - name: Checkout repository uses: actions/checkout@v3 @@ -23,54 +22,40 @@ jobs: submodules: true lfs: false - - name: Setup .NET SDK - uses: actions/setup-dotnet@v3 - with: - dotnet-version: '8.0.x' - - name: Cache NuGet packages uses: actions/cache@v3 with: path: ~/.nuget/packages key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} - restore-keys: | - ${{ runner.os }}-nuget- - - - name: Cache .NET Workload Packs - uses: actions/cache@v3 - with: - path: ~/.dotnet - key: ${{ runner.os }}-dotnet-workloads-${{ hashFiles('**/*.csproj') }} - restore-keys: | - ${{ runner.os }}-dotnet-workloads- + restore-keys: ${{ runner.os }}-nuget- - name: Install WASM Tools workload run: dotnet workload install wasm-tools - name: Publish Blazor WebAssembly (AOT + Brotli) - run: dotnet publish ./Client \ - -c Release \ - /p:RunAOTCompilation=true \ - /p:CompressionEnabled=true + run: | + dotnet publish ./Client \ + -c Release \ + /p:RunAOTCompilation=true \ + /p:CompressionEnabled=true - - name: Build and Deploy to Azure Static Web Apps + - name: Build And 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_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: upload - app_location: ./Client - api_location: Api - output_location: wwwroot + repo_token: ${{ secrets.GITHUB_TOKEN }} + action: upload + app_location: "./Client" + api_location: "Api" + output_location: "wwwroot" close_pull_request_job: if: github.event_name == 'pull_request' && github.event.action == 'closed' runs-on: ubuntu-latest name: Close Pull Request Job - steps: - - name: Close Preview + - name: Close Pull Request Preview Environment uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} From 54857ab8b7f24946879640ac9cec871785d64e80 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Tue, 8 Jul 2025 12:11:06 +0530 Subject: [PATCH 22/73] Code optimized. --- Client/Client.csproj | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Client/Client.csproj b/Client/Client.csproj index 1034042..fa8cbb2 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -8,20 +8,18 @@ - - true true + link + true + true true - true - false false false - partial - true + true none - + true - + From 89bff48f4589e1cecd1938a992459ef6ce465071 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Tue, 8 Jul 2025 12:43:07 +0530 Subject: [PATCH 23/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- .../azure-static-web-apps-orange-water-0badfae10.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 3ada28b..66aefbf 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -35,10 +35,7 @@ jobs: - name: Publish Blazor WebAssembly (AOT + Brotli) run: | dotnet publish ./Client \ - -c Release \ - /p:RunAOTCompilation=true \ - /p:CompressionEnabled=true - + -c Release - name: Build And Deploy to Azure Static Web Apps uses: Azure/static-web-apps-deploy@v1 with: From 4ad5003a508e64c4c84af85bb414e11b21f93adb Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Tue, 8 Jul 2025 12:50:23 +0530 Subject: [PATCH 24/73] Code update --- Client/Client.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/Client/Client.csproj b/Client/Client.csproj index fa8cbb2..a7713ef 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -18,6 +18,7 @@ true none true + false From 46c122f4937f308279aba0895d6d74c7d897832f Mon Sep 17 00:00:00 2001 From: Chandradev Date: Tue, 8 Jul 2025 13:04:15 +0530 Subject: [PATCH 25/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 60 ++++++++----------- 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 66aefbf..fd418d1 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -2,58 +2,50 @@ name: Azure Static Web Apps CI/CD on: push: - branches: - - main + branches: [ main ] pull_request: - types: [opened, synchronize, reopened, closed] - branches: - - main + types: [ opened, synchronize, reopened, closed ] + branches: [ main ] jobs: build_and_deploy_job: - if: github.event_name == 'push' || - (github.event_name == 'pull_request' && github.event.action != 'closed') + if: github.event_name == 'push' || + (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest - name: Build and Deploy Job + steps: - - name: Checkout repository + - name: Checkout uses: actions/checkout@v3 - with: - submodules: true - lfs: false - - name: Cache NuGet packages - uses: actions/cache@v3 + - name: Setup .NET SDK + uses: actions/setup-dotnet@v3 with: - path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} - restore-keys: ${{ runner.os }}-nuget- + dotnet-version: '8.0.x' - - name: Install WASM Tools workload + - name: Install WASM workload run: dotnet workload install wasm-tools - - name: Publish Blazor WebAssembly (AOT + Brotli) - run: | - dotnet publish ./Client \ - -c Release - - name: Build And Deploy to Azure Static Web Apps + - name: Publish release build + run: dotnet publish Client -c Release + + - 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_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: upload - app_location: "./Client" - api_location: "Api" - output_location: "wwwroot" + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} + repo_token: ${{ secrets.GITHUB_TOKEN }} + action: upload + + # ← point at the *published* wwwroot, not the source folder + app_location: Client/bin/Release/net8.0/wwwroot + api_location: Api + output_location: '' close_pull_request_job: - if: github.event_name == 'pull_request' && - github.event.action == 'closed' + if: github.event_name == 'pull_request' && github.event.action == 'closed' runs-on: ubuntu-latest - name: Close Pull Request Job steps: - - name: Close Pull Request Preview Environment + - name: Close Preview uses: Azure/static-web-apps-deploy@v1 with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} action: close From ec0d70d6ae681b2e8f585d8d3c19fabcf74034ce Mon Sep 17 00:00:00 2001 From: Chandradev Date: Tue, 8 Jul 2025 13:08:27 +0530 Subject: [PATCH 26/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 33 +++++++++++++------ 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index fd418d1..b4d981c 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -2,19 +2,22 @@ name: Azure Static Web Apps CI/CD on: push: - branches: [ main ] + branches: + - main pull_request: - types: [ opened, synchronize, reopened, closed ] - branches: [ main ] + types: [opened, synchronize, reopened, closed] + branches: + - main jobs: build_and_deploy_job: if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest + name: Build and Deploy steps: - - name: Checkout + - name: Checkout repository uses: actions/checkout@v3 - name: Setup .NET SDK @@ -22,29 +25,39 @@ jobs: with: dotnet-version: '8.0.x' + - name: Cache NuGet packages + uses: actions/cache@v3 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} + restore-keys: ${{ runner.os }}-nuget- + - name: Install WASM workload run: dotnet workload install wasm-tools - - name: Publish release build + - name: Publish Blazor release build run: dotnet publish Client -c Release - name: Deploy to Azure Static Web Apps uses: Azure/static-web-apps-deploy@v1 with: + # Replace this with the name of your repo secret azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }} action: upload - - # ← point at the *published* wwwroot, not the source folder - app_location: Client/bin/Release/net8.0/wwwroot + # Point at your published output (contains all .br, .wasm, .dll) + app_location: Client/bin/Release/net8.0/wwwroot api_location: Api - output_location: '' + # No extra subfolder under the publish directory + output_location: '' close_pull_request_job: if: github.event_name == 'pull_request' && github.event.action == 'closed' runs-on: ubuntu-latest + name: Close PR Preview + steps: - - name: Close Preview + - name: Close Static Web Apps Preview uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} From 943c16dc60d9f72b6b6f9259e660f7de7abcf011 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Tue, 8 Jul 2025 13:12:30 +0530 Subject: [PATCH 27/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 38 ++++++++----------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index b4d981c..d06e8d4 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -2,12 +2,10 @@ name: Azure Static Web Apps CI/CD on: push: - branches: - - main + branches: [ main ] pull_request: - types: [opened, synchronize, reopened, closed] - branches: - - main + types: [ opened, synchronize, reopened, closed ] + branches: [ main ] jobs: build_and_deploy_job: @@ -25,13 +23,6 @@ jobs: with: dotnet-version: '8.0.x' - - name: Cache NuGet packages - uses: actions/cache@v3 - with: - path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} - restore-keys: ${{ runner.os }}-nuget- - - name: Install WASM workload run: dotnet workload install wasm-tools @@ -41,15 +32,18 @@ jobs: - name: Deploy to Azure Static Web Apps uses: Azure/static-web-apps-deploy@v1 with: - # Replace this with the name of your repo secret - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: upload - # Point at your published output (contains all .br, .wasm, .dll) - app_location: Client/bin/Release/net8.0/wwwroot - api_location: Api - # No extra subfolder under the publish directory - output_location: '' + # πŸ‘‡ Use the exact secret name you added under Settingsβ†’Secrets + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} + repo_token: ${{ secrets.GITHUB_TOKEN }} + action: upload + + # point at your published output (contains .br/.wasm/.dll) + app_location: Client/bin/Release/net8.0/wwwroot + api_location: Api + output_location: '' + + # if you want builds on forks or branches without the secret to still pass + skip_deploy_on_missing_secrets: true close_pull_request_job: if: github.event_name == 'pull_request' && github.event.action == 'closed' @@ -60,5 +54,5 @@ jobs: - name: Close Static Web Apps Preview uses: Azure/static-web-apps-deploy@v1 with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} action: close From 0e4efa117b2d0be91d906652a8bcec2c5f18e9b5 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Tue, 8 Jul 2025 13:16:32 +0530 Subject: [PATCH 28/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 63 ++++++++++--------- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index d06e8d4..28d90b4 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -2,57 +2,64 @@ name: Azure Static Web Apps CI/CD on: push: - branches: [ main ] + branches: + - main pull_request: - types: [ opened, synchronize, reopened, closed ] - branches: [ main ] + types: [opened, synchronize, reopened, closed] + branches: + - main jobs: build_and_deploy_job: - if: github.event_name == 'push' || - (github.event_name == 'pull_request' && github.event.action != 'closed') + if: github.event_name == 'push' || + (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest - name: Build and Deploy + name: Build and Deploy Job steps: - name: Checkout repository uses: actions/checkout@v3 + with: + submodules: true + lfs: false - - name: Setup .NET SDK - uses: actions/setup-dotnet@v3 + - name: Cache NuGet packages + uses: actions/cache@v3 with: - dotnet-version: '8.0.x' + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-nuget- - - name: Install WASM workload + - name: Install WASM Tools workload run: dotnet workload install wasm-tools - - name: Publish Blazor release build - run: dotnet publish Client -c Release + - name: Publish Blazor WebAssembly (AOT + Brotli) + run: | + dotnet publish ./Client \ + -c Release \ + /p:RunAOTCompilation=true \ + /p:CompressionEnabled=true - - name: Deploy to Azure Static Web Apps + - name: Build And Deploy to Azure Static Web Apps uses: Azure/static-web-apps-deploy@v1 with: - # πŸ‘‡ Use the exact secret name you added under Settingsβ†’Secrets azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: upload - - # point at your published output (contains .br/.wasm/.dll) - app_location: Client/bin/Release/net8.0/wwwroot - api_location: Api - output_location: '' - - # if you want builds on forks or branches without the secret to still pass - skip_deploy_on_missing_secrets: true + repo_token: ${{ secrets.GITHUB_TOKEN }} + action: upload + app_location: ./Client + api_location: Api + output_location: wwwroot close_pull_request_job: - if: github.event_name == 'pull_request' && github.event.action == 'closed' + if: github.event_name == 'pull_request' && + github.event.action == 'closed' runs-on: ubuntu-latest - name: Close PR Preview + name: Close Pull Request Job steps: - - name: Close Static Web Apps Preview + - name: Close Preview uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} - action: close + action: close From af58ed3397fb9c7a6c8d90a91a4e78494bf396d1 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 10:31:15 +0530 Subject: [PATCH 29/73] Update azure-static-web-apps-orange-water-0badfae10.yml From 38d2999414a5c2804bd36aa6c521c4dd5871e79d Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 10:35:39 +0530 Subject: [PATCH 30/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 28d90b4..269b80a 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -23,6 +23,11 @@ jobs: submodules: true lfs: false + - name: Setup .NET SDK + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.0.x' + - name: Cache NuGet packages uses: actions/cache@v3 with: @@ -31,25 +36,32 @@ jobs: restore-keys: | ${{ runner.os }}-nuget- + - name: Cache .NET Workload Packs + uses: actions/cache@v3 + with: + path: ~/.dotnet + key: ${{ runner.os }}-dotnet-workloads-${{ hashFiles('**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-dotnet-workloads- + - name: Install WASM Tools workload run: dotnet workload install wasm-tools - name: Publish Blazor WebAssembly (AOT + Brotli) - run: | - dotnet publish ./Client \ - -c Release \ - /p:RunAOTCompilation=true \ - /p:CompressionEnabled=true + run: dotnet publish ./Client \ + -c Release \ + /p:RunAOTCompilation=true \ + /p:CompressionEnabled=true - - name: Build And Deploy to Azure Static Web Apps + - name: Build and 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_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: upload - app_location: ./Client - api_location: Api - output_location: wwwroot + repo_token: ${{ secrets.GITHUB_TOKEN }} + action: upload + app_location: ./Client + api_location: Api + output_location: wwwroot close_pull_request_job: if: github.event_name == 'pull_request' && @@ -62,4 +74,4 @@ jobs: uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} - action: close + action: close From eba17a1b70531bdf3415f7f9024272de9dab3143 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 10:48:25 +0530 Subject: [PATCH 31/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- .../azure-static-web-apps-orange-water-0badfae10.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 269b80a..f275412 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -47,12 +47,8 @@ jobs: - name: Install WASM Tools workload run: dotnet workload install wasm-tools - - name: Publish Blazor WebAssembly (AOT + Brotli) - run: dotnet publish ./Client \ - -c Release \ - /p:RunAOTCompilation=true \ - /p:CompressionEnabled=true - + - name: Publish Blazor WebAssembly + run: dotnet publish ./Client -c Release - name: Build and Deploy to Azure Static Web Apps uses: Azure/static-web-apps-deploy@v1 with: From 82833129656a3d3920f4870e8f6acf01e7ab9b4a Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Wed, 9 Jul 2025 11:55:04 +0530 Subject: [PATCH 32/73] Code Cleanup done. --- Client/staticwebapp.config.json | 10 +--------- Client/wwwroot/index.html | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Client/staticwebapp.config.json b/Client/staticwebapp.config.json index 89c1a96..e094983 100644 --- a/Client/staticwebapp.config.json +++ b/Client/staticwebapp.config.json @@ -1,13 +1,5 @@ { - "$schema": "https://aka.ms/swa/v2/schemas/staticwebapp.config.json", - - "mimeTypes": { - ".br": "application/octet-stream" - }, - "navigationFallback": { - "rewrite": "index.html", - "exclude": [ "/_framework/*", "/api/*" ] + "rewrite": "/index.html" } - } diff --git a/Client/wwwroot/index.html b/Client/wwwroot/index.html index f5ad03f..ac3035a 100644 --- a/Client/wwwroot/index.html +++ b/Client/wwwroot/index.html @@ -29,7 +29,7 @@ Reload πŸ—™ - + From 245d8f43f0aae11e4d76af410a8a4c8a016b6928 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Wed, 9 Jul 2025 11:59:12 +0530 Subject: [PATCH 33/73] Code optimize --- Client/wwwroot/index.html | 50 ++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/Client/wwwroot/index.html b/Client/wwwroot/index.html index ac3035a..02e219b 100644 --- a/Client/wwwroot/index.html +++ b/Client/wwwroot/index.html @@ -1,20 +1,26 @@ - - - - Azure Static Web Apps Blazor Sample - - - - - - - - - + + + Azure Static Web Blazor + + + + + + +
@@ -23,14 +29,20 @@
-
- An unhandled error has occurred. - Reload - πŸ—™ + An error occurred. Reload Γ—
+ - - + \ No newline at end of file From abf2c21eeaa665622abc0535bae10420baafa3e3 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Wed, 9 Jul 2025 12:18:00 +0530 Subject: [PATCH 34/73] Code clean --- Client/Client.csproj | 4 ++- Client/wwwroot/index.html | 51 +++++++++++++++------------------------ 2 files changed, 23 insertions(+), 32 deletions(-) diff --git a/Client/Client.csproj b/Client/Client.csproj index a7713ef..0307327 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -18,9 +18,11 @@ true none true - false + true + true + diff --git a/Client/wwwroot/index.html b/Client/wwwroot/index.html index 02e219b..d67715f 100644 --- a/Client/wwwroot/index.html +++ b/Client/wwwroot/index.html @@ -1,26 +1,21 @@ - - - - Azure Static Web Blazor - - - - - - + + + + Azure Static Web Apps Blazor Sample + + + + + + + + + +
@@ -29,20 +24,14 @@
+
- An error occurred. Reload Γ— + An unhandled error has occurred. + Reload + πŸ—™
- - \ No newline at end of file + + From 34099be6482c5c6154794df5c02f2d0eb5ea06c5 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 12:20:36 +0530 Subject: [PATCH 35/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index f275412..b57efc4 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -11,7 +11,7 @@ on: jobs: build_and_deploy_job: - if: github.event_name == 'push' || + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest name: Build and Deploy Job @@ -47,21 +47,23 @@ jobs: - name: Install WASM Tools workload run: dotnet workload install wasm-tools - - name: Publish Blazor WebAssembly - run: dotnet publish ./Client -c Release + - name: Publish Blazor WebAssembly (Release with AOT support) + run: dotnet publish ./Client -c Release -o build + + - name: List published files (optional) + run: ls -R build + - name: Build and 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_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: upload - app_location: ./Client - api_location: Api - output_location: wwwroot + repo_token: ${{ secrets.GITHUB_TOKEN }} + action: upload + app_location: build + output_location: wwwroot close_pull_request_job: - if: github.event_name == 'pull_request' && - github.event.action == 'closed' + if: github.event_name == 'pull_request' && github.event.action == 'closed' runs-on: ubuntu-latest name: Close Pull Request Job From da7e87476f24edaaf1f6f8ca47355eb083147090 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 12:24:03 +0530 Subject: [PATCH 36/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- .../azure-static-web-apps-orange-water-0badfae10.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index b57efc4..f3f3830 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -47,10 +47,13 @@ jobs: - name: Install WASM Tools workload run: dotnet workload install wasm-tools - - name: Publish Blazor WebAssembly (Release with AOT support) - run: dotnet publish ./Client -c Release -o build + - name: Publish Blazor WebAssembly Client + run: dotnet publish ./Client -c Release -o build/client - - name: List published files (optional) + - name: Publish Azure Function API + run: dotnet publish ./Api -c Release -o build/api + + - name: List Published Files (optional) run: ls -R build - name: Build and Deploy to Azure Static Web Apps @@ -59,7 +62,8 @@ jobs: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} repo_token: ${{ secrets.GITHUB_TOKEN }} action: upload - app_location: build + app_location: build/client + api_location: build/api output_location: wwwroot close_pull_request_job: From 9f9aedbb41e3b2c95d6b077f5b2207d351ed2e26 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 12:31:41 +0530 Subject: [PATCH 37/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index f3f3830..c40f4fb 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -11,7 +11,7 @@ on: jobs: build_and_deploy_job: - if: github.event_name == 'push' || + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest name: Build and Deploy Job @@ -47,27 +47,24 @@ jobs: - name: Install WASM Tools workload run: dotnet workload install wasm-tools - - name: Publish Blazor WebAssembly Client - run: dotnet publish ./Client -c Release -o build/client - - - name: Publish Azure Function API - run: dotnet publish ./Api -c Release -o build/api - - - name: List Published Files (optional) - run: ls -R build + - name: Publish Blazor WebAssembly (AOT + Brotli) + run: dotnet publish ./Client -c Release \ + /p:BlazorWebAssemblyEnableAOT=true \ + /p:CompressionEnabled=true - name: Build and 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_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: upload - app_location: build/client - api_location: build/api - output_location: wwwroot + repo_token: ${{ secrets.GITHUB_TOKEN }} + action: upload + app_location: ./Client + api_location: Api + output_location: wwwroot close_pull_request_job: - if: github.event_name == 'pull_request' && github.event.action == 'closed' + if: github.event_name == 'pull_request' && + github.event.action == 'closed' runs-on: ubuntu-latest name: Close Pull Request Job From d8798cb6ca308ba722c564e5264929217f9a8051 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 12:35:11 +0530 Subject: [PATCH 38/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- .../azure-static-web-apps-orange-water-0badfae10.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index c40f4fb..cca802c 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -48,9 +48,7 @@ jobs: run: dotnet workload install wasm-tools - name: Publish Blazor WebAssembly (AOT + Brotli) - run: dotnet publish ./Client -c Release \ - /p:BlazorWebAssemblyEnableAOT=true \ - /p:CompressionEnabled=true + run: dotnet publish ./Client -c Release /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true - name: Build and Deploy to Azure Static Web Apps uses: Azure/static-web-apps-deploy@v1 From 00247f5f2e2085ee590b9ecf203867e6d0a893a1 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Wed, 9 Jul 2025 12:47:08 +0530 Subject: [PATCH 39/73] code --- Client/staticwebapp.config.json | 37 +++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/Client/staticwebapp.config.json b/Client/staticwebapp.config.json index e094983..c996f1b 100644 --- a/Client/staticwebapp.config.json +++ b/Client/staticwebapp.config.json @@ -1,5 +1,38 @@ { "navigationFallback": { - "rewrite": "/index.html" - } + "rewrite": "/index.html", + "exclude": [ "/api/*" ] + }, + "routes": [ + { + "route": "/_framework/*", + "headers": { + "cache-control": "public, max-age=31536000, immutable" + } + }, + { + "route": "/**/*.dll", + "headers": { + "cache-control": "public, max-age=31536000, immutable" + } + }, + { + "route": "/**/*.wasm", + "headers": { + "cache-control": "public, max-age=31536000, immutable" + } + }, + { + "route": "/**/*.js", + "headers": { + "cache-control": "public, max-age=31536000, immutable" + } + }, + { + "route": "/**/*.css", + "headers": { + "cache-control": "public, max-age=31536000, immutable" + } + } + ] } From fd695c81f40a7ca6ea060ed114173a95f80f3faa Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Wed, 9 Jul 2025 12:52:09 +0530 Subject: [PATCH 40/73] Code. --- Client/staticwebapp.config.json | 35 +++------------------------------ 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/Client/staticwebapp.config.json b/Client/staticwebapp.config.json index c996f1b..ed0c4b2 100644 --- a/Client/staticwebapp.config.json +++ b/Client/staticwebapp.config.json @@ -3,36 +3,7 @@ "rewrite": "/index.html", "exclude": [ "/api/*" ] }, - "routes": [ - { - "route": "/_framework/*", - "headers": { - "cache-control": "public, max-age=31536000, immutable" - } - }, - { - "route": "/**/*.dll", - "headers": { - "cache-control": "public, max-age=31536000, immutable" - } - }, - { - "route": "/**/*.wasm", - "headers": { - "cache-control": "public, max-age=31536000, immutable" - } - }, - { - "route": "/**/*.js", - "headers": { - "cache-control": "public, max-age=31536000, immutable" - } - }, - { - "route": "/**/*.css", - "headers": { - "cache-control": "public, max-age=31536000, immutable" - } - } - ] + "globalHeaders": { + "cache-control": "public, max-age=31536000, immutable" + } } From 79127d90602da1a5fef1b3405df087f744f330d3 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 13:11:13 +0530 Subject: [PATCH 41/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...e-static-web-apps-orange-water-0badfae10.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index cca802c..f4e2264 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -50,15 +50,22 @@ jobs: - name: Publish Blazor WebAssembly (AOT + Brotli) run: dotnet publish ./Client -c Release /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true + - name: Brotli compress DLL, WASM, JS and PDB + run: | + sudo apt-get install brotli -y + find ./Client/bin/Release/net8.0/publish/wwwroot \ + -type f \( -name "*.dll" -o -name "*.pdb" -o -name "*.wasm" -o -name "*.js" \) \ + -exec brotli -f -q 11 {} \; + - name: Build and 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_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: upload - app_location: ./Client - api_location: Api - output_location: wwwroot + repo_token: ${{ secrets.GITHUB_TOKEN }} + action: upload + app_location: ./Client + api_location: Api + output_location: bin/Release/net8.0/publish/wwwroot close_pull_request_job: if: github.event_name == 'pull_request' && From 6760b23842743bd945ac0103b25ba2d9e2225240 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 13:17:14 +0530 Subject: [PATCH 42/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- .../azure-static-web-apps-orange-water-0badfae10.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index f4e2264..f7e770a 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -50,12 +50,8 @@ jobs: - name: Publish Blazor WebAssembly (AOT + Brotli) run: dotnet publish ./Client -c Release /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true - - name: Brotli compress DLL, WASM, JS and PDB - run: | - sudo apt-get install brotli -y - find ./Client/bin/Release/net8.0/publish/wwwroot \ - -type f \( -name "*.dll" -o -name "*.pdb" -o -name "*.wasm" -o -name "*.js" \) \ - -exec brotli -f -q 11 {} \; + - name: List published output (Debug) + run: ls -alR ./Client/bin/Release/net8.0/publish/wwwroot - name: Build and Deploy to Azure Static Web Apps uses: Azure/static-web-apps-deploy@v1 @@ -64,8 +60,7 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} action: upload app_location: ./Client - api_location: Api - output_location: bin/Release/net8.0/publish/wwwroot + output_location: ./Client/bin/Release/net8.0/publish/wwwroot close_pull_request_job: if: github.event_name == 'pull_request' && From 60f288e535580ca8143a686385909ff8b51db975 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 13:21:29 +0530 Subject: [PATCH 43/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 33 ++++--------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index f7e770a..4990bc5 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -19,48 +19,29 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 - with: - submodules: true - lfs: false - name: Setup .NET SDK uses: actions/setup-dotnet@v3 with: dotnet-version: '8.0.x' - - name: Cache NuGet packages - uses: actions/cache@v3 - with: - path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} - restore-keys: | - ${{ runner.os }}-nuget- - - - name: Cache .NET Workload Packs - uses: actions/cache@v3 - with: - path: ~/.dotnet - key: ${{ runner.os }}-dotnet-workloads-${{ hashFiles('**/*.csproj') }} - restore-keys: | - ${{ runner.os }}-dotnet-workloads- - - name: Install WASM Tools workload run: dotnet workload install wasm-tools - - name: Publish Blazor WebAssembly (AOT + Brotli) - run: dotnet publish ./Client -c Release /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true + - name: Publish Blazor WASM with AOT + Brotli + run: dotnet publish ./Client -c Release -o release /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true - - name: List published output (Debug) - run: ls -alR ./Client/bin/Release/net8.0/publish/wwwroot + - name: List output (debug) + run: ls -alR ./release/wwwroot - - name: Build and Deploy to Azure Static Web Apps + - 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_ORANGE_WATER_0BADFAE10 }} repo_token: ${{ secrets.GITHUB_TOKEN }} action: upload - app_location: ./Client - output_location: ./Client/bin/Release/net8.0/publish/wwwroot + app_location: . + output_location: ./release/wwwroot close_pull_request_job: if: github.event_name == 'pull_request' && From b8b44efac75a521fee286bad07b9bd871cc139a4 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 13:22:19 +0530 Subject: [PATCH 44/73] Update azure-static-web-apps-orange-water-0badfae10.yml From 62af2307d78b6bc4ec679abb182c5369c6d670a4 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 13:25:08 +0530 Subject: [PATCH 45/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...zure-static-web-apps-orange-water-0badfae10.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 4990bc5..e893bff 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -11,8 +11,7 @@ on: jobs: build_and_deploy_job: - if: github.event_name == 'push' || - (github.event_name == 'pull_request' && github.event.action != 'closed') + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest name: Build and Deploy Job @@ -28,10 +27,10 @@ jobs: - name: Install WASM Tools workload run: dotnet workload install wasm-tools - - name: Publish Blazor WASM with AOT + Brotli + - name: Publish Blazor WebAssembly (AOT + Brotli) run: dotnet publish ./Client -c Release -o release /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true - - name: List output (debug) + - name: List output directory (debug) run: ls -alR ./release/wwwroot - name: Deploy to Azure Static Web Apps @@ -40,12 +39,11 @@ jobs: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} repo_token: ${{ secrets.GITHUB_TOKEN }} action: upload - app_location: . - output_location: ./release/wwwroot + app_location: . # This disables Oryx + output_location: ./release/wwwroot # This is where index.html exists close_pull_request_job: - if: github.event_name == 'pull_request' && - github.event.action == 'closed' + if: github.event_name == 'pull_request' && github.event.action == 'closed' runs-on: ubuntu-latest name: Close Pull Request Job From f3b944569920ee29316d06130bccaf5f98e1a59c Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 13:28:38 +0530 Subject: [PATCH 46/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...azure-static-web-apps-orange-water-0badfae10.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index e893bff..a4cdfcc 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -27,11 +27,14 @@ jobs: - name: Install WASM Tools workload run: dotnet workload install wasm-tools - - name: Publish Blazor WebAssembly (AOT + Brotli) - run: dotnet publish ./Client -c Release -o release /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true + - name: Publish Blazor WASM (AOT + Brotli) + run: | + dotnet publish ./Client -c Release /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true + mkdir -p output + cp -r ./Client/bin/Release/net8.0/publish/wwwroot/* output/ - name: List output directory (debug) - run: ls -alR ./release/wwwroot + run: ls -alR ./output - name: Deploy to Azure Static Web Apps uses: Azure/static-web-apps-deploy@v1 @@ -39,8 +42,8 @@ jobs: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} repo_token: ${{ secrets.GITHUB_TOKEN }} action: upload - app_location: . # This disables Oryx - output_location: ./release/wwwroot # This is where index.html exists + app_location: . + output_location: ./output close_pull_request_job: if: github.event_name == 'pull_request' && github.event.action == 'closed' From 32a67ba3b4266d11f047ee0e31744064c010d395 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 13:32:25 +0530 Subject: [PATCH 47/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index a4cdfcc..34a45f2 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -13,45 +13,45 @@ jobs: build_and_deploy_job: if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest - name: Build and Deploy Job + name: Build and Deploy Blazor WebAssembly steps: - - name: Checkout repository + - name: πŸ“₯ Checkout repository uses: actions/checkout@v3 - - name: Setup .NET SDK + - name: πŸ› οΈ Setup .NET SDK uses: actions/setup-dotnet@v3 with: dotnet-version: '8.0.x' - - name: Install WASM Tools workload + - name: βš™οΈ Install WASM tools run: dotnet workload install wasm-tools - - name: Publish Blazor WASM (AOT + Brotli) + - name: πŸš€ Publish Blazor WASM (AOT + Brotli) run: | dotnet publish ./Client -c Release /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true mkdir -p output cp -r ./Client/bin/Release/net8.0/publish/wwwroot/* output/ - - name: List output directory (debug) - run: ls -alR ./output + - name: πŸ§ͺ Debug List output contents + run: ls -al output - - name: Deploy to Azure Static Web Apps + - 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_ORANGE_WATER_0BADFAE10 }} repo_token: ${{ secrets.GITHUB_TOKEN }} action: upload app_location: . - output_location: ./output + output_location: output close_pull_request_job: if: github.event_name == 'pull_request' && github.event.action == 'closed' runs-on: ubuntu-latest - name: Close Pull Request Job + name: Close Pull Request Preview steps: - - name: Close Preview + - name: πŸ”’ Close Preview Environment uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} From c325caf75d2805e83aa811f0b26bd579c237364c Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 13:36:03 +0530 Subject: [PATCH 48/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 34a45f2..f6e156b 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -13,30 +13,28 @@ jobs: build_and_deploy_job: if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest - name: Build and Deploy Blazor WebAssembly + name: Build and Deploy Blazor WASM steps: - - name: πŸ“₯ Checkout repository + - name: Checkout code uses: actions/checkout@v3 - - name: πŸ› οΈ Setup .NET SDK + - name: Setup .NET uses: actions/setup-dotnet@v3 with: dotnet-version: '8.0.x' - - name: βš™οΈ Install WASM tools + - name: Install WASM tools run: dotnet workload install wasm-tools - - name: πŸš€ Publish Blazor WASM (AOT + Brotli) + - name: Publish Blazor WASM (AOT + Brotli) run: | dotnet publish ./Client -c Release /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true mkdir -p output cp -r ./Client/bin/Release/net8.0/publish/wwwroot/* output/ + cp ./Client/staticwebapp.config.json output/ || true - - name: πŸ§ͺ Debug List output contents - run: ls -al output - - - name: πŸš€ Deploy to Azure Static Web Apps + - 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_ORANGE_WATER_0BADFAE10 }} @@ -48,10 +46,10 @@ jobs: close_pull_request_job: if: github.event_name == 'pull_request' && github.event.action == 'closed' runs-on: ubuntu-latest - name: Close Pull Request Preview + name: Close Preview steps: - - name: πŸ”’ Close Preview Environment + - name: Close Preview Environment uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} From 9b1683fb2dc757d01e84cbf4535f3f5b9c3c6809 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 13:38:55 +0530 Subject: [PATCH 49/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- .../azure-static-web-apps-orange-water-0badfae10.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index f6e156b..4fdd1be 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -27,12 +27,12 @@ jobs: - name: Install WASM tools run: dotnet workload install wasm-tools - - name: Publish Blazor WASM (AOT + Brotli) + - name: Publish Blazor WebAssembly (AOT + Brotli) run: | dotnet publish ./Client -c Release /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true - mkdir -p output - cp -r ./Client/bin/Release/net8.0/publish/wwwroot/* output/ - cp ./Client/staticwebapp.config.json output/ || true + mkdir output + cp -r ./Client/bin/Release/net8.0/publish/wwwroot/* ./output/ + cp ./Client/staticwebapp.config.json ./output/ || true - name: Deploy to Azure Static Web Apps uses: Azure/static-web-apps-deploy@v1 From 4e61c89674746dfaf480b6bc8521d509130f3874 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 13:41:48 +0530 Subject: [PATCH 50/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- .../azure-static-web-apps-orange-water-0badfae10.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 4fdd1be..262f630 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -30,7 +30,7 @@ jobs: - name: Publish Blazor WebAssembly (AOT + Brotli) run: | dotnet publish ./Client -c Release /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true - mkdir output + mkdir -p output cp -r ./Client/bin/Release/net8.0/publish/wwwroot/* ./output/ cp ./Client/staticwebapp.config.json ./output/ || true @@ -40,8 +40,8 @@ jobs: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} repo_token: ${{ secrets.GITHUB_TOKEN }} action: upload - app_location: . - output_location: output + app_location: . # disables Oryx detection + output_location: output # this is the exact folder where index.html exists close_pull_request_job: if: github.event_name == 'pull_request' && github.event.action == 'closed' @@ -49,7 +49,7 @@ jobs: name: Close Preview steps: - - name: Close Preview Environment + - name: Close Preview uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} From 4cb3e21e1a2e8d6aff0482549d29762a23e365e9 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 13:42:40 +0530 Subject: [PATCH 51/73] Update azure-static-web-apps-orange-water-0badfae10.yml From 7e2f5e9862f106ffd523c67d66a7f8307a22394a Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 13:45:38 +0530 Subject: [PATCH 52/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...e-static-web-apps-orange-water-0badfae10.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 262f630..8f0629d 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -13,7 +13,7 @@ jobs: build_and_deploy_job: if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest - name: Build and Deploy Blazor WASM + name: Build and Deploy Job steps: - name: Checkout code @@ -27,12 +27,13 @@ jobs: - name: Install WASM tools run: dotnet workload install wasm-tools - - name: Publish Blazor WebAssembly (AOT + Brotli) + - name: Publish Blazor WASM with AOT and Brotli run: | - dotnet publish ./Client -c Release /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true + dotnet publish ./Client -c Release -o build_output /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true + ls -la build_output/wwwroot # just to verify files exist mkdir -p output - cp -r ./Client/bin/Release/net8.0/publish/wwwroot/* ./output/ - cp ./Client/staticwebapp.config.json ./output/ || true + cp -r build_output/wwwroot/* output/ + cp ./Client/staticwebapp.config.json output/ || true - name: Deploy to Azure Static Web Apps uses: Azure/static-web-apps-deploy@v1 @@ -40,8 +41,8 @@ jobs: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} repo_token: ${{ secrets.GITHUB_TOKEN }} action: upload - app_location: . # disables Oryx detection - output_location: output # this is the exact folder where index.html exists + app_location: . # disables Oryx + output_location: output # contains index.html close_pull_request_job: if: github.event_name == 'pull_request' && github.event.action == 'closed' @@ -49,7 +50,7 @@ jobs: name: Close Preview steps: - - name: Close Preview + - name: Close Preview Environment uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} From ed04cb03093ae289632460a3186bd335761abbc7 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 13:46:08 +0530 Subject: [PATCH 53/73] Update azure-static-web-apps-orange-water-0badfae10.yml From 13972b27a12e27da027af5021d1ceb7ea158dbbb Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 13:48:32 +0530 Subject: [PATCH 54/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 37 ++++++------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 8f0629d..de10610 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -10,48 +10,35 @@ on: - main jobs: - build_and_deploy_job: - if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') + build_and_deploy: runs-on: ubuntu-latest - name: Build and Deploy Job + name: Build and Deploy Blazor WebAssembly steps: - - name: Checkout code + - name: Checkout uses: actions/checkout@v3 - - name: Setup .NET + - name: Setup .NET SDK uses: actions/setup-dotnet@v3 with: dotnet-version: '8.0.x' - - name: Install WASM tools + - name: Install WASM workload run: dotnet workload install wasm-tools - - name: Publish Blazor WASM with AOT and Brotli + - name: Build and Publish run: | dotnet publish ./Client -c Release -o build_output /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true - ls -la build_output/wwwroot # just to verify files exist - mkdir -p output + mkdir output cp -r build_output/wwwroot/* output/ - cp ./Client/staticwebapp.config.json output/ || true + echo "Index files in output:" + ls -la output/index.html || echo "index.html missing!" - 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_ORANGE_WATER_0BADFAE10 }} + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }} action: upload - app_location: . # disables Oryx - output_location: output # contains index.html - - close_pull_request_job: - if: github.event_name == 'pull_request' && github.event.action == 'closed' - runs-on: ubuntu-latest - name: Close Preview - - steps: - - name: Close Preview Environment - uses: Azure/static-web-apps-deploy@v1 - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} - action: close + app_location: . # prevents Oryx from building + output_location: output # points to built index.html From f31ea5f1d9894f929113155deec6b02ea6e457cc Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 15:03:39 +0530 Subject: [PATCH 55/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- .../workflows/azure-static-web-apps-orange-water-0badfae10.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index de10610..21f024c 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -37,7 +37,7 @@ jobs: - 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 }} + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} repo_token: ${{ secrets.GITHUB_TOKEN }} action: upload app_location: . # prevents Oryx from building From 9a8fe3e9855adbf48a474ba0c3102fcebff1e1ce Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 15:12:35 +0530 Subject: [PATCH 56/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 21f024c..420e236 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -15,30 +15,31 @@ jobs: name: Build and Deploy Blazor WebAssembly steps: - - name: Checkout + - name: πŸ“₯ Checkout code uses: actions/checkout@v3 - - name: Setup .NET SDK + - name: βš™οΈ Setup .NET SDK uses: actions/setup-dotnet@v3 with: dotnet-version: '8.0.x' - - name: Install WASM workload + - name: πŸ› οΈ Install WASM tools run: dotnet workload install wasm-tools - - name: Build and Publish + - name: πŸ—οΈ Build and Publish Blazor WebAssembly run: | dotnet publish ./Client -c Release -o build_output /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true mkdir output cp -r build_output/wwwroot/* output/ - echo "Index files in output:" - ls -la output/index.html || echo "index.html missing!" + echo "βœ… Contents of output directory:" + ls -la output - - name: Deploy to Azure Static Web Apps + - 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_ORANGE_WATER_0BADFAE10 }} repo_token: ${{ secrets.GITHUB_TOKEN }} action: upload - app_location: . # prevents Oryx from building - output_location: output # points to built index.html + app_location: . # Points to root (required but irrelevant when build is skipped) + output_location: output # This folder contains your index.html + skip_app_build: true # βœ… This tells Azure to skip Oryx build From 45da432b5705d09a54b35a224ef8aebe3ee50503 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 15:16:26 +0530 Subject: [PATCH 57/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 420e236..adf2470 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -15,31 +15,30 @@ jobs: name: Build and Deploy Blazor WebAssembly steps: - - name: πŸ“₯ Checkout code + - name: ⬇️ Checkout Code uses: actions/checkout@v3 - - name: βš™οΈ Setup .NET SDK + - name: 🧰 Setup .NET SDK uses: actions/setup-dotnet@v3 with: dotnet-version: '8.0.x' - - name: πŸ› οΈ Install WASM tools + - name: πŸ› οΈ Install WASM Workload run: dotnet workload install wasm-tools - - name: πŸ—οΈ Build and Publish Blazor WebAssembly + - name: πŸ“¦ Build and Publish Blazor WebAssembly run: | dotnet publish ./Client -c Release -o build_output /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true mkdir output cp -r build_output/wwwroot/* output/ - echo "βœ… Contents of output directory:" - ls -la output + echo "βœ… Files copied to output folder:" + ls -la output/index.html || echo "❌ index.html is missing!" - 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_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} + repo_token: ${{ secrets.GITHUB_TOKEN }} # Required for PR status action: upload - app_location: . # Points to root (required but irrelevant when build is skipped) - output_location: output # This folder contains your index.html - skip_app_build: true # βœ… This tells Azure to skip Oryx build + app_location: output # πŸ‘‰ Points to folder containing index.html + skip_app_build: true # πŸ‘‰ Skip Azure's internal Oryx build From 4795773cc483ca3afa48ad3e79be8d63e9dc2576 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Wed, 9 Jul 2025 15:29:32 +0530 Subject: [PATCH 58/73] Code updated. --- Client/staticwebapp.config.json | 40 ++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/Client/staticwebapp.config.json b/Client/staticwebapp.config.json index ed0c4b2..bb2c1bd 100644 --- a/Client/staticwebapp.config.json +++ b/Client/staticwebapp.config.json @@ -1,9 +1,39 @@ { - "navigationFallback": { - "rewrite": "/index.html", - "exclude": [ "/api/*" ] + "mimeTypes": { + ".dll": "application/octet-stream", + ".wasm": "application/wasm", + ".js": "application/javascript", + ".json": "application/json", + ".br": "application/octet-stream" }, - "globalHeaders": { - "cache-control": "public, max-age=31536000, immutable" + "responseOverrides": { + "/_framework/*.dll.br": { + "statusCode": 200, + "headers": { + "Content-Encoding": "br", + "Content-Type": "application/octet-stream" + } + }, + "/_framework/*.wasm.br": { + "statusCode": 200, + "headers": { + "Content-Encoding": "br", + "Content-Type": "application/wasm" + } + }, + "/_framework/*.js.br": { + "statusCode": 200, + "headers": { + "Content-Encoding": "br", + "Content-Type": "application/javascript" + } + }, + "/_framework/*.json.br": { + "statusCode": 200, + "headers": { + "Content-Encoding": "br", + "Content-Type": "application/json" + } + } } } From 5eea580215968d90eb03d27cc80adf074b9703d4 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 15:35:47 +0530 Subject: [PATCH 59/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- .../azure-static-web-apps-orange-water-0badfae10.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index adf2470..dbabdfe 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -31,14 +31,14 @@ jobs: dotnet publish ./Client -c Release -o build_output /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true mkdir output cp -r build_output/wwwroot/* output/ - echo "βœ… Files copied to output folder:" - ls -la output/index.html || echo "❌ index.html is missing!" + cp staticwebapp.config.json output/ + find output -name "*.br" - 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_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} # Required for PR status + repo_token: ${{ secrets.GITHUB_TOKEN }} action: upload - app_location: output # πŸ‘‰ Points to folder containing index.html - skip_app_build: true # πŸ‘‰ Skip Azure's internal Oryx build + app_location: output + skip_app_build: true From 2a233d33b01ff8eb281e557b8a6e7097c6a710bd Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Wed, 9 Jul 2025 15:43:22 +0530 Subject: [PATCH 60/73] Code --- Client/staticwebapp.config.json | 37 ++------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/Client/staticwebapp.config.json b/Client/staticwebapp.config.json index bb2c1bd..a97a412 100644 --- a/Client/staticwebapp.config.json +++ b/Client/staticwebapp.config.json @@ -1,39 +1,6 @@ { "mimeTypes": { - ".dll": "application/octet-stream", - ".wasm": "application/wasm", - ".js": "application/javascript", - ".json": "application/json", - ".br": "application/octet-stream" - }, - "responseOverrides": { - "/_framework/*.dll.br": { - "statusCode": 200, - "headers": { - "Content-Encoding": "br", - "Content-Type": "application/octet-stream" - } - }, - "/_framework/*.wasm.br": { - "statusCode": 200, - "headers": { - "Content-Encoding": "br", - "Content-Type": "application/wasm" - } - }, - "/_framework/*.js.br": { - "statusCode": 200, - "headers": { - "Content-Encoding": "br", - "Content-Type": "application/javascript" - } - }, - "/_framework/*.json.br": { - "statusCode": 200, - "headers": { - "Content-Encoding": "br", - "Content-Type": "application/json" - } - } + ".dll.br": "application/octet-stream; charset=utf-8; encoding=br", + ".wasm.br": "application/wasm; charset=utf-8; encoding=br" } } From 73dd4bc8614cb7aa5a16e8f21b67e4841283863f Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Wed, 9 Jul 2025 15:49:38 +0530 Subject: [PATCH 61/73] Code. --- Client/staticwebapp.config.json | 37 +++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/Client/staticwebapp.config.json b/Client/staticwebapp.config.json index a97a412..bb2c1bd 100644 --- a/Client/staticwebapp.config.json +++ b/Client/staticwebapp.config.json @@ -1,6 +1,39 @@ { "mimeTypes": { - ".dll.br": "application/octet-stream; charset=utf-8; encoding=br", - ".wasm.br": "application/wasm; charset=utf-8; encoding=br" + ".dll": "application/octet-stream", + ".wasm": "application/wasm", + ".js": "application/javascript", + ".json": "application/json", + ".br": "application/octet-stream" + }, + "responseOverrides": { + "/_framework/*.dll.br": { + "statusCode": 200, + "headers": { + "Content-Encoding": "br", + "Content-Type": "application/octet-stream" + } + }, + "/_framework/*.wasm.br": { + "statusCode": 200, + "headers": { + "Content-Encoding": "br", + "Content-Type": "application/wasm" + } + }, + "/_framework/*.js.br": { + "statusCode": 200, + "headers": { + "Content-Encoding": "br", + "Content-Type": "application/javascript" + } + }, + "/_framework/*.json.br": { + "statusCode": 200, + "headers": { + "Content-Encoding": "br", + "Content-Type": "application/json" + } + } } } From 66cd7221c726f954666cfd0965559111e15518ce Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 16:03:28 +0530 Subject: [PATCH 62/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 64 ++++++++++++++----- 1 file changed, 47 insertions(+), 17 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index dbabdfe..cca802c 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -10,35 +10,65 @@ on: - main jobs: - build_and_deploy: + build_and_deploy_job: + if: github.event_name == 'push' || + (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest - name: Build and Deploy Blazor WebAssembly + name: Build and Deploy Job steps: - - name: ⬇️ Checkout Code + - name: Checkout repository uses: actions/checkout@v3 + with: + submodules: true + lfs: false - - name: 🧰 Setup .NET SDK + - name: Setup .NET SDK uses: actions/setup-dotnet@v3 with: dotnet-version: '8.0.x' - - name: πŸ› οΈ Install WASM Workload + - name: Cache NuGet packages + uses: actions/cache@v3 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-nuget- + + - name: Cache .NET Workload Packs + uses: actions/cache@v3 + with: + path: ~/.dotnet + key: ${{ runner.os }}-dotnet-workloads-${{ hashFiles('**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-dotnet-workloads- + + - name: Install WASM Tools workload run: dotnet workload install wasm-tools - - name: πŸ“¦ Build and Publish Blazor WebAssembly - run: | - dotnet publish ./Client -c Release -o build_output /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true - mkdir output - cp -r build_output/wwwroot/* output/ - cp staticwebapp.config.json output/ - find output -name "*.br" + - name: Publish Blazor WebAssembly (AOT + Brotli) + run: dotnet publish ./Client -c Release /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true + + - name: Build and 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_ORANGE_WATER_0BADFAE10 }} + repo_token: ${{ secrets.GITHUB_TOKEN }} + action: upload + app_location: ./Client + api_location: Api + output_location: wwwroot - - name: πŸš€ Deploy to Azure Static Web Apps + close_pull_request_job: + if: github.event_name == 'pull_request' && + github.event.action == 'closed' + runs-on: ubuntu-latest + name: Close Pull Request Job + + steps: + - name: Close Preview uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: upload - app_location: output - skip_app_build: true + action: close From 582426515b66ba3c9740069815abda0e34b9d356 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Wed, 9 Jul 2025 16:10:43 +0530 Subject: [PATCH 63/73] Code pushed. --- Client/staticwebapp.config.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Client/staticwebapp.config.json b/Client/staticwebapp.config.json index bb2c1bd..f9d660d 100644 --- a/Client/staticwebapp.config.json +++ b/Client/staticwebapp.config.json @@ -1,4 +1,7 @@ { + "navigationFallback": { + "rewrite": "/index.html" + }, "mimeTypes": { ".dll": "application/octet-stream", ".wasm": "application/wasm", From 2039615f8bab78f349b05dacd932a787c6944402 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 16:11:29 +0530 Subject: [PATCH 64/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 65 +++++-------------- 1 file changed, 17 insertions(+), 48 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index cca802c..44889a0 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -10,65 +10,34 @@ on: - main jobs: - build_and_deploy_job: - if: github.event_name == 'push' || - (github.event_name == 'pull_request' && github.event.action != 'closed') + build_and_deploy: runs-on: ubuntu-latest - name: Build and Deploy Job + name: Build and Deploy Blazor WebAssembly steps: - - name: Checkout repository + - name: ⬇️ Checkout code uses: actions/checkout@v3 - with: - submodules: true - lfs: false - - name: Setup .NET SDK + - name: 🧰 Setup .NET 8 SDK uses: actions/setup-dotnet@v3 with: dotnet-version: '8.0.x' - - name: Cache NuGet packages - uses: actions/cache@v3 - with: - path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} - restore-keys: | - ${{ runner.os }}-nuget- - - - name: Cache .NET Workload Packs - uses: actions/cache@v3 - with: - path: ~/.dotnet - key: ${{ runner.os }}-dotnet-workloads-${{ hashFiles('**/*.csproj') }} - restore-keys: | - ${{ runner.os }}-dotnet-workloads- - - - name: Install WASM Tools workload + - name: πŸ› οΈ Install WASM workload run: dotnet workload install wasm-tools - - name: Publish Blazor WebAssembly (AOT + Brotli) - run: dotnet publish ./Client -c Release /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true + - name: πŸ“¦ Build and Publish with AOT & Brotli + run: | + dotnet publish ./Client -c Release -o build_output /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true + mkdir output + cp -r build_output/wwwroot/* output/ + echo "βœ… Published output copied to output/" - - name: Build and 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_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: upload - app_location: ./Client - api_location: Api - output_location: wwwroot - - close_pull_request_job: - if: github.event_name == 'pull_request' && - github.event.action == 'closed' - runs-on: ubuntu-latest - name: Close Pull Request Job - - steps: - - name: Close Preview + - 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_ORANGE_WATER_0BADFAE10 }} - action: close + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_XXX }} + repo_token: ${{ secrets.GITHUB_TOKEN }} # For PR status checks + action: upload + app_location: output # Points to folder with index.html + skip_app_build: true # Skips Oryx build From 076ef1fbdb037113582673c7fa33ed78b7cc71ae Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 16:15:56 +0530 Subject: [PATCH 65/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- .../workflows/azure-static-web-apps-orange-water-0badfae10.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 44889a0..92ccfec 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -36,7 +36,7 @@ jobs: - 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_XXX }} + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} repo_token: ${{ secrets.GITHUB_TOKEN }} # For PR status checks action: upload app_location: output # Points to folder with index.html From 2b25ddf8746ad710a776c0bc673f6798bb164e6c Mon Sep 17 00:00:00 2001 From: Chandradev Date: Wed, 9 Jul 2025 16:27:02 +0530 Subject: [PATCH 66/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- .../workflows/azure-static-web-apps-orange-water-0badfae10.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 92ccfec..acef048 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -31,6 +31,7 @@ jobs: dotnet publish ./Client -c Release -o build_output /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true mkdir output cp -r build_output/wwwroot/* output/ + cp ./Client/wwwroot/staticwebapp.config.json output/ echo "βœ… Published output copied to output/" - name: πŸš€ Deploy to Azure Static Web Apps From ff805ffe0870e8122782eff90d87db68d8ceaee5 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Wed, 9 Jul 2025 16:38:25 +0530 Subject: [PATCH 67/73] code push --- Client/{ => wwwroot}/staticwebapp.config.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Client/{ => wwwroot}/staticwebapp.config.json (100%) diff --git a/Client/staticwebapp.config.json b/Client/wwwroot/staticwebapp.config.json similarity index 100% rename from Client/staticwebapp.config.json rename to Client/wwwroot/staticwebapp.config.json From 787bb21cb26ba5de429cce99cbeca1af33b4d3c2 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Wed, 9 Jul 2025 16:42:24 +0530 Subject: [PATCH 68/73] code. --- Client/wwwroot/staticwebapp.config.json | 37 ++++--------------------- 1 file changed, 5 insertions(+), 32 deletions(-) diff --git a/Client/wwwroot/staticwebapp.config.json b/Client/wwwroot/staticwebapp.config.json index f9d660d..303e917 100644 --- a/Client/wwwroot/staticwebapp.config.json +++ b/Client/wwwroot/staticwebapp.config.json @@ -1,42 +1,15 @@ { "navigationFallback": { - "rewrite": "/index.html" + "rewrite": "/index.html", + "exclude": [ "/assets/*", "/css/*", "/js/*", "/favicon.ico" ] }, "mimeTypes": { - ".dll": "application/octet-stream", ".wasm": "application/wasm", - ".js": "application/javascript", - ".json": "application/json", - ".br": "application/octet-stream" + ".br": "application/brotli" }, "responseOverrides": { - "/_framework/*.dll.br": { - "statusCode": 200, - "headers": { - "Content-Encoding": "br", - "Content-Type": "application/octet-stream" - } - }, - "/_framework/*.wasm.br": { - "statusCode": 200, - "headers": { - "Content-Encoding": "br", - "Content-Type": "application/wasm" - } - }, - "/_framework/*.js.br": { - "statusCode": 200, - "headers": { - "Content-Encoding": "br", - "Content-Type": "application/javascript" - } - }, - "/_framework/*.json.br": { - "statusCode": 200, - "headers": { - "Content-Encoding": "br", - "Content-Type": "application/json" - } + "404": { + "rewrite": "/index.html" } } } From ae623eb6f7944da986248223300118cdc280a450 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Thu, 10 Jul 2025 10:25:04 +0530 Subject: [PATCH 69/73] Code updated. --- Client/{wwwroot => }/staticwebapp.config.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Client/{wwwroot => }/staticwebapp.config.json (100%) diff --git a/Client/wwwroot/staticwebapp.config.json b/Client/staticwebapp.config.json similarity index 100% rename from Client/wwwroot/staticwebapp.config.json rename to Client/staticwebapp.config.json From 2db697e08a68b2bd86e0b4d06dd93fc695acc397 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Thu, 10 Jul 2025 10:28:07 +0530 Subject: [PATCH 70/73] Code updated. --- Client/staticwebapp.config.json | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Client/staticwebapp.config.json b/Client/staticwebapp.config.json index 303e917..e094983 100644 --- a/Client/staticwebapp.config.json +++ b/Client/staticwebapp.config.json @@ -1,15 +1,5 @@ { "navigationFallback": { - "rewrite": "/index.html", - "exclude": [ "/assets/*", "/css/*", "/js/*", "/favicon.ico" ] - }, - "mimeTypes": { - ".wasm": "application/wasm", - ".br": "application/brotli" - }, - "responseOverrides": { - "404": { - "rewrite": "/index.html" - } + "rewrite": "/index.html" } } From e6a524bc273e4302115979555f94f48d175d72ba Mon Sep 17 00:00:00 2001 From: Chandradev Date: Thu, 10 Jul 2025 10:35:34 +0530 Subject: [PATCH 71/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- ...static-web-apps-orange-water-0badfae10.yml | 64 ++++++++++++++----- 1 file changed, 47 insertions(+), 17 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index acef048..2f2c4a0 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -10,35 +10,65 @@ on: - main jobs: - build_and_deploy: + build_and_deploy_job: + if: github.event_name == 'push' || + (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest - name: Build and Deploy Blazor WebAssembly + name: Build and Deploy Job steps: - - name: ⬇️ Checkout code + - name: Checkout repository uses: actions/checkout@v3 + with: + submodules: true + lfs: false - - name: 🧰 Setup .NET 8 SDK + - name: Setup .NET SDK uses: actions/setup-dotnet@v3 with: dotnet-version: '8.0.x' - - name: πŸ› οΈ Install WASM workload + - name: Cache NuGet packages + uses: actions/cache@v3 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-nuget- + + - name: Cache .NET Workload Packs + uses: actions/cache@v3 + with: + path: ~/.dotnet + key: ${{ runner.os }}-dotnet-workloads-${{ hashFiles('**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-dotnet-workloads- + + - name: Install WASM Tools workload run: dotnet workload install wasm-tools - - name: πŸ“¦ Build and Publish with AOT & Brotli - run: | - dotnet publish ./Client -c Release -o build_output /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true - mkdir output - cp -r build_output/wwwroot/* output/ - cp ./Client/wwwroot/staticwebapp.config.json output/ - echo "βœ… Published output copied to output/" + - name: Publish Blazor WebAssembly (AOT + Brotli) + run: dotnet publish ./Client -c Release /p:BlazorWebAssemblyEnableAOT=false /p:CompressionEnabled=true + + - name: Build and 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_ORANGE_WATER_0BADFAE10 }} + repo_token: ${{ secrets.GITHUB_TOKEN }} + action: upload + app_location: ./Client + api_location: Api + output_location: wwwroot - - name: πŸš€ Deploy to Azure Static Web Apps + close_pull_request_job: + if: github.event_name == 'pull_request' && + github.event.action == 'closed' + runs-on: ubuntu-latest + name: Close Pull Request Job + + steps: + - name: Close Preview uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_WATER_0BADFAE10 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} # For PR status checks - action: upload - app_location: output # Points to folder with index.html - skip_app_build: true # Skips Oryx build + action: close From c7cf25363932ed70bbf8e914e3d512b0e4e41ab9 Mon Sep 17 00:00:00 2001 From: Chandradev Date: Thu, 10 Jul 2025 10:47:49 +0530 Subject: [PATCH 72/73] Update azure-static-web-apps-orange-water-0badfae10.yml --- .../workflows/azure-static-web-apps-orange-water-0badfae10.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml index 2f2c4a0..cca802c 100644 --- a/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml +++ b/.github/workflows/azure-static-web-apps-orange-water-0badfae10.yml @@ -48,7 +48,7 @@ jobs: run: dotnet workload install wasm-tools - name: Publish Blazor WebAssembly (AOT + Brotli) - run: dotnet publish ./Client -c Release /p:BlazorWebAssemblyEnableAOT=false /p:CompressionEnabled=true + run: dotnet publish ./Client -c Release /p:BlazorWebAssemblyEnableAOT=true /p:CompressionEnabled=true - name: Build and Deploy to Azure Static Web Apps uses: Azure/static-web-apps-deploy@v1 From d674f232b1aa098e141e4673eff5c9501bde5a06 Mon Sep 17 00:00:00 2001 From: Chandradev819 Date: Thu, 10 Jul 2025 10:56:13 +0530 Subject: [PATCH 73/73] Code test --- Client/Client.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Client/Client.csproj b/Client/Client.csproj index 0307327..74e8346 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -7,7 +7,7 @@ BlazorApp.Client - +