From cd5f19defde9dbfe452335a8406c332a42111048 Mon Sep 17 00:00:00 2001 From: Sachira Demein <167645904+sachirademein17@users.noreply.github.com> Date: Thu, 20 Nov 2025 14:06:58 +0530 Subject: [PATCH 1/8] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/master_app-service-app.yml | 76 ++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/master_app-service-app.yml diff --git a/.github/workflows/master_app-service-app.yml b/.github/workflows/master_app-service-app.yml new file mode 100644 index 000000000..f73d6d9f4 --- /dev/null +++ b/.github/workflows/master_app-service-app.yml @@ -0,0 +1,76 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions +# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions + +name: Build and deploy Python app to Azure Web App - App-Service-app + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read #This is required for actions/checkout + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python version + uses: actions/setup-python@v5 + with: + python-version: '3.13' + + # 🛠️ Local Build Section (Optional) + # The following section in your workflow is designed to catch build issues early on the client side, before deployment. This can be helpful for debugging and validation. However, if this step significantly increases deployment time and early detection is not critical for your workflow, you may remove this section to streamline the deployment process. + - name: Create and Start virtual environment and Install dependencies + run: | + python -m venv antenv + source antenv/bin/activate + pip install -r requirements.txt + + # By default, when you enable GitHub CI/CD integration through the Azure portal, the platform automatically sets the SCM_DO_BUILD_DURING_DEPLOYMENT application setting to true. This triggers the use of Oryx, a build engine that handles application compilation and dependency installation (e.g., pip install) directly on the platform during deployment. Hence, we exclude the antenv virtual environment directory from the deployment artifact to reduce the payload size. + - name: Upload artifact for deployment jobs + uses: actions/upload-artifact@v4 + with: + name: python-app + path: | + . + !antenv/ + + # 🚫 Opting Out of Oryx Build + # If you prefer to disable the Oryx build process during deployment, follow these steps: + # 1. Remove the SCM_DO_BUILD_DURING_DEPLOYMENT app setting from your Azure App Service Environment variables. + # 2. Refer to sample workflows for alternative deployment strategies: https://github.com/Azure/actions-workflow-samples/tree/master/AppService + + + deploy: + runs-on: ubuntu-latest + needs: build + permissions: + id-token: write #This is required for requesting the JWT + contents: read #This is required for actions/checkout + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v4 + with: + name: python-app + + - name: Login to Azure + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_F3594ADED2D44E8FA55C6CC5D6FF60B3 }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_C2094F323BE5408EB297A6CF563548CA }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_F757A4C339144162B1E14826FC54B6F8 }} + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v3 + id: deploy-to-webapp + with: + app-name: 'App-Service-app' + slot-name: 'Production' + \ No newline at end of file From 9d26d9741b4e5bb676652de83a1fd0cb22cfe56c Mon Sep 17 00:00:00 2001 From: Sachira Demein <167645904+sachirademein17@users.noreply.github.com> Date: Thu, 20 Nov 2025 14:09:42 +0530 Subject: [PATCH 2/8] Fix typo in hello function return message --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 7f8a1f2e8..3e1f18269 100644 --- a/app.py +++ b/app.py @@ -3,4 +3,4 @@ @app.route("/") def hello(): - return "Hello, World!" + return "Hello, Worlld!" From 0c7217254bb0f77282ced417b27791a771632074 Mon Sep 17 00:00:00 2001 From: Sachira Demein <167645904+sachirademein17@users.noreply.github.com> Date: Thu, 20 Nov 2025 14:18:21 +0530 Subject: [PATCH 3/8] Change greeting message in hello route --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 3e1f18269..e8f739e79 100644 --- a/app.py +++ b/app.py @@ -3,4 +3,4 @@ @app.route("/") def hello(): - return "Hello, Worlld!" + return "Loku Scene da!" From b935c0f5d245936a4e1f10a20bbbb5ccefcd5311 Mon Sep 17 00:00:00 2001 From: Sachira Demein <167645904+sachirademein17@users.noreply.github.com> Date: Thu, 20 Nov 2025 21:29:25 +0530 Subject: [PATCH 4/8] Update app.py --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index e8f739e79..4ae63fa7c 100644 --- a/app.py +++ b/app.py @@ -3,4 +3,4 @@ @app.route("/") def hello(): - return "Loku Scene da!" + return "Kariya Loku scene da! Donige birthday lagai kiyl scene thiyagnn epa !!!" From e72fa2bdbf199a0fa3630c44436edb790953b83d Mon Sep 17 00:00:00 2001 From: Sachira Demein <167645904+sachirademein17@users.noreply.github.com> Date: Fri, 21 Nov 2025 09:17:09 +0530 Subject: [PATCH 5/8] Update app.py --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 4ae63fa7c..3855837c3 100644 --- a/app.py +++ b/app.py @@ -3,4 +3,4 @@ @app.route("/") def hello(): - return "Kariya Loku scene da! Donige birthday lagai kiyl scene thiyagnn epa !!!" + return "Just Do It!" From 49aa25ca29874eaede7619e14b02d0ae4e6f64fb Mon Sep 17 00:00:00 2001 From: Sachira Demein <167645904+sachirademein17@users.noreply.github.com> Date: Fri, 21 Nov 2025 16:41:14 +0530 Subject: [PATCH 6/8] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/master_app-service-app.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/master_app-service-app.yml b/.github/workflows/master_app-service-app.yml index f73d6d9f4..0aa0218cd 100644 --- a/.github/workflows/master_app-service-app.yml +++ b/.github/workflows/master_app-service-app.yml @@ -63,9 +63,9 @@ jobs: - name: Login to Azure uses: azure/login@v2 with: - client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_F3594ADED2D44E8FA55C6CC5D6FF60B3 }} - tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_C2094F323BE5408EB297A6CF563548CA }} - subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_F757A4C339144162B1E14826FC54B6F8 }} + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_089DD412F15F4A8F88C5A10EFEF91C2C }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_2341029459FF4F15AF075EACDD7D2493 }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_0B0D0978DE1B4EC5BAF6397932198A5D }} - name: 'Deploy to Azure Web App' uses: azure/webapps-deploy@v3 From 3a972d13de7d5d0620fcba182d510524a804c14b Mon Sep 17 00:00:00 2001 From: Sachira Demein <167645904+sachirademein17@users.noreply.github.com> Date: Fri, 21 Nov 2025 16:43:46 +0530 Subject: [PATCH 7/8] Update app.py --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 3855837c3..9bf10833d 100644 --- a/app.py +++ b/app.py @@ -3,4 +3,4 @@ @app.route("/") def hello(): - return "Just Do It!" + return "Just Do Iit!" From f214dc459a7f4cc7e56f0f84f71d958e947c4c96 Mon Sep 17 00:00:00 2001 From: Sachira Demein <167645904+sachirademein17@users.noreply.github.com> Date: Sat, 22 Nov 2025 13:55:55 +0530 Subject: [PATCH 8/8] Create edit.txt --- edit.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 edit.txt diff --git a/edit.txt b/edit.txt new file mode 100644 index 000000000..366226fb9 --- /dev/null +++ b/edit.txt @@ -0,0 +1 @@ +edit