From 981b9c012e1507e112455ad3a8479f48c008d6df Mon Sep 17 00:00:00 2001 From: Tai Dang <156822314+taidangduc@users.noreply.github.com> Date: Mon, 16 Mar 2026 11:08:58 +0700 Subject: [PATCH 1/4] ci: add Azure Static Web Apps workflow file on-behalf-of: @Azure opensource@microsoft.com --- ...-static-web-apps-witty-grass-02274f41e.yml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/azure-static-web-apps-witty-grass-02274f41e.yml diff --git a/.github/workflows/azure-static-web-apps-witty-grass-02274f41e.yml b/.github/workflows/azure-static-web-apps-witty-grass-02274f41e.yml new file mode 100644 index 0000000..7b758ab --- /dev/null +++ b/.github/workflows/azure-static-web-apps-witty-grass-02274f41e.yml @@ -0,0 +1,46 @@ +name: Azure Static Web Apps CI/CD + +on: + push: + branches: + - release + pull_request: + types: [opened, synchronize, reopened, closed] + branches: + - release + +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_WITTY_GRASS_02274F41E }} + 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: "./src/UI/reactjs" # App source code path + api_location: "" # Api source code path - optional + output_location: "dist" # 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_WITTY_GRASS_02274F41E }} + action: "close" From 142237636f206dcc1ceb02f4819414bee542b479 Mon Sep 17 00:00:00 2001 From: taidangduc Date: Mon, 16 Mar 2026 12:56:23 +0700 Subject: [PATCH 2/4] test: add console --- src/UI/reactjs/src/lib/api-client.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/UI/reactjs/src/lib/api-client.ts b/src/UI/reactjs/src/lib/api-client.ts index 08fcbaa..b0ab0c4 100644 --- a/src/UI/reactjs/src/lib/api-client.ts +++ b/src/UI/reactjs/src/lib/api-client.ts @@ -8,4 +8,6 @@ export const apiClient = axios.create({ headers: { "Content-Type": "application/json" } -}); \ No newline at end of file +}); + +console.log("API URL:", import.meta.env.VITE_API_BASE_URL); \ No newline at end of file From 3ec11099daf93d521eb032acce48d7151318c154 Mon Sep 17 00:00:00 2001 From: Tai Dang <156822314+taidangduc@users.noreply.github.com> Date: Mon, 16 Mar 2026 13:25:32 +0700 Subject: [PATCH 3/4] Update Azure Static Web Apps workflow with env variable Added environment variable for API base URL in the build job. --- .../workflows/azure-static-web-apps-witty-grass-02274f41e.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/azure-static-web-apps-witty-grass-02274f41e.yml b/.github/workflows/azure-static-web-apps-witty-grass-02274f41e.yml index 7b758ab..09fab5b 100644 --- a/.github/workflows/azure-static-web-apps-witty-grass-02274f41e.yml +++ b/.github/workflows/azure-static-web-apps-witty-grass-02274f41e.yml @@ -32,6 +32,8 @@ jobs: api_location: "" # Api source code path - optional output_location: "dist" # Built app content directory - optional ###### End of Repository/Build Configurations ###### + env: + VITE_API_BASE_URL: ${{ secrets.VITE_API_BASE_URL}} close_pull_request_job: if: github.event_name == 'pull_request' && github.event.action == 'closed' From e614bc6df7173a35ae9472afe402784a90051f4a Mon Sep 17 00:00:00 2001 From: taidangduc Date: Mon, 16 Mar 2026 13:27:55 +0700 Subject: [PATCH 4/4] chore: remove console --- src/UI/reactjs/src/lib/api-client.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/UI/reactjs/src/lib/api-client.ts b/src/UI/reactjs/src/lib/api-client.ts index b0ab0c4..08fcbaa 100644 --- a/src/UI/reactjs/src/lib/api-client.ts +++ b/src/UI/reactjs/src/lib/api-client.ts @@ -8,6 +8,4 @@ export const apiClient = axios.create({ headers: { "Content-Type": "application/json" } -}); - -console.log("API URL:", import.meta.env.VITE_API_BASE_URL); \ No newline at end of file +}); \ No newline at end of file