From cbbb5ddcb1ec14d997871ddc6d20d9654b0fd17d Mon Sep 17 00:00:00 2001 From: Vektor19 Date: Mon, 29 Dec 2025 01:46:35 +0200 Subject: [PATCH 1/4] chore/249: fix deploy yml file --- .github/workflows/azure-static-web-apps.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/azure-static-web-apps.yml b/.github/workflows/azure-static-web-apps.yml index b8f1878..6781ce2 100644 --- a/.github/workflows/azure-static-web-apps.yml +++ b/.github/workflows/azure-static-web-apps.yml @@ -24,6 +24,8 @@ jobs: - name: Build And Deploy id: builddeploy uses: Azure/static-web-apps-deploy@v1 + env: + REACT_APP_BACKEND_URL: ${{ secrets.REACT_APP_BACKEND_URL }} with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) From ebdea13efe7ea066b39fcc892b410d07bf8eca9b Mon Sep 17 00:00:00 2001 From: Vektor19 Date: Mon, 29 Dec 2025 02:14:27 +0200 Subject: [PATCH 2/4] chore/249: clean up azure-static-web-apps.yml formatting and remove unnecessary comments --- .github/workflows/azure-static-web-apps.yml | 37 ++++++++++----------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/azure-static-web-apps.yml b/.github/workflows/azure-static-web-apps.yml index 6781ce2..3c3363b 100644 --- a/.github/workflows/azure-static-web-apps.yml +++ b/.github/workflows/azure-static-web-apps.yml @@ -8,7 +8,7 @@ on: pull_request: types: [opened, synchronize, reopened, closed] branches: - - main + - main - dev jobs: @@ -16,35 +16,32 @@ jobs: 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 - env: + + - run: npm ci + + - env: REACT_APP_BACKEND_URL: ${{ secrets.REACT_APP_BACKEND_URL }} + run: npm run build + + - uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} - repo_token: ${{ secrets.GITHUB_TOKEN }} # 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: "/" # App source code path - api_location: "" # Api source code path - optional - output_location: "dist" # Built app content directory - optional - ###### End of Repository/Build Configurations ###### + repo_token: ${{ secrets.GITHUB_TOKEN }} + action: upload + app_location: "/" + api_location: "" + output_location: "dist" 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 + - uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} - action: "close" + action: close From 64ec2d9ed267dededb6de5b48098337244dc1aa9 Mon Sep 17 00:00:00 2001 From: Vektor19 Date: Mon, 29 Dec 2025 03:18:49 +0200 Subject: [PATCH 3/4] chore/249: refactor azure-static-web-apps.yml for improved clarity and structure --- .github/workflows/azure-static-web-apps.yml | 29 +++++++++++---------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/azure-static-web-apps.yml b/.github/workflows/azure-static-web-apps.yml index 3c3363b..c12f6bc 100644 --- a/.github/workflows/azure-static-web-apps.yml +++ b/.github/workflows/azure-static-web-apps.yml @@ -8,7 +8,7 @@ on: pull_request: types: [opened, synchronize, reopened, closed] branches: - - main + - main - dev jobs: @@ -16,32 +16,33 @@ jobs: 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 - - - run: npm ci - - - env: - REACT_APP_BACKEND_URL: ${{ secrets.REACT_APP_BACKEND_URL }} - run: npm run build - - - uses: Azure/static-web-apps-deploy@v1 + 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 }} repo_token: ${{ secrets.GITHUB_TOKEN }} - action: upload + action: "upload" app_location: "/" api_location: "" output_location: "dist" + app_build_command: 'npm run build' + env: + REACT_APP_BACKEND_URL: ${{ secrets.REACT_APP_BACKEND_URL }} close_pull_request_job: if: github.event_name == 'pull_request' && github.event.action == 'closed' runs-on: ubuntu-latest name: Close Pull Request Job - steps: - - uses: Azure/static-web-apps-deploy@v1 + - 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 }} - action: close + action: "close" From 8be5bfc62c1dd5355e445153864a343f6f462a54 Mon Sep 17 00:00:00 2001 From: Vektor19 Date: Mon, 29 Dec 2025 03:32:24 +0200 Subject: [PATCH 4/4] chore/249: add backend URL to .env.production for deployment configuration --- .env.production | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.production b/.env.production index 6c24d88..23653fc 100644 --- a/.env.production +++ b/.env.production @@ -1 +1,2 @@ +REACT_APP_BACKEND_URL=https://streetcodeserver-d7hxascranene7cj.polandcentral-01.azurewebsites.net/api REACT_APP_TEMPVAL=prodval \ No newline at end of file