From 3caffe7a51fdf4dc7f175507a1ea0890a223735a Mon Sep 17 00:00:00 2001 From: Michael Biodun Olomide <39876588+adekeji@users.noreply.github.com> Date: Sun, 15 Sep 2024 17:33:14 +0100 Subject: [PATCH 1/4] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/main_greengold.yml | 78 ++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 .github/workflows/main_greengold.yml diff --git a/.github/workflows/main_greengold.yml b/.github/workflows/main_greengold.yml new file mode 100644 index 000000000..ca147ecfa --- /dev/null +++ b/.github/workflows/main_greengold.yml @@ -0,0 +1,78 @@ +# 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 - greengold + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python version + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Create and start virtual environment + run: | + python -m venv venv + source venv/bin/activate + + - name: Install dependencies + run: pip install -r requirements.txt + + # Optional: Add step to run tests here (PyTest, Django test suites, etc.) + + - name: Zip artifact for deployment + run: zip release.zip ./* -r + + - name: Upload artifact for deployment jobs + uses: actions/upload-artifact@v4 + with: + name: python-app + path: | + release.zip + !venv/ + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + permissions: + id-token: write #This is required for requesting the JWT + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v4 + with: + name: python-app + + - name: Unzip artifact for deployment + run: unzip release.zip + + + - name: Login to Azure + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_9EB1C736CC6442EE8BB9ED5A1B39A4BD }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_2735D429AD324C1DBC018F46DE446A50 }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_689ECC40B2094F50A2974992721F47B8 }} + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v3 + id: deploy-to-webapp + with: + app-name: 'greengold' + slot-name: 'Production' + \ No newline at end of file From 870c0a81718fbb1ca66d9769d1feb8342c979cbd Mon Sep 17 00:00:00 2001 From: Michael Biodun Olomide <39876588+adekeji@users.noreply.github.com> Date: Sun, 15 Sep 2024 17:48:34 +0100 Subject: [PATCH 2/4] Update hello.html --- templates/hello.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/hello.html b/templates/hello.html index c277e7740..adfce50db 100644 --- a/templates/hello.html +++ b/templates/hello.html @@ -1,6 +1,6 @@ - Hello Azure - Python Quickstart + GreenGold Communications @@ -18,4 +18,4 @@

Hello {{name}}

- \ No newline at end of file + From 80e2ac234cb2bb327d5450bebe8b1712dccc0591 Mon Sep 17 00:00:00 2001 From: Michael Biodun Olomide <39876588+adekeji@users.noreply.github.com> Date: Sun, 15 Sep 2024 17:50:31 +0100 Subject: [PATCH 3/4] Update index.html --- templates/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/index.html b/templates/index.html index 9cdba30cd..000c9b7d5 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,6 +1,6 @@ - Hello Azure - Python Quickstart + GreenGold Communications @@ -10,7 +10,7 @@
Azure Logo -

Welcome to Azure

+

Welcome to GreenGold Communications

@@ -27,4 +27,4 @@

Welcome to Azure

- \ No newline at end of file + From 55664971064abb6a32ed4fa3194fce1e71fe21cb Mon Sep 17 00:00:00 2001 From: Michael Biodun Olomide <39876588+adekeji@users.noreply.github.com> Date: Sun, 30 Mar 2025 13:37:30 +0100 Subject: [PATCH 4/4] Remove the Azure App Service build and deployment workflow config --- .github/workflows/main_greengold.yml | 78 ---------------------------- 1 file changed, 78 deletions(-) delete mode 100644 .github/workflows/main_greengold.yml diff --git a/.github/workflows/main_greengold.yml b/.github/workflows/main_greengold.yml deleted file mode 100644 index ca147ecfa..000000000 --- a/.github/workflows/main_greengold.yml +++ /dev/null @@ -1,78 +0,0 @@ -# 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 - greengold - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python version - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Create and start virtual environment - run: | - python -m venv venv - source venv/bin/activate - - - name: Install dependencies - run: pip install -r requirements.txt - - # Optional: Add step to run tests here (PyTest, Django test suites, etc.) - - - name: Zip artifact for deployment - run: zip release.zip ./* -r - - - name: Upload artifact for deployment jobs - uses: actions/upload-artifact@v4 - with: - name: python-app - path: | - release.zip - !venv/ - - deploy: - runs-on: ubuntu-latest - needs: build - environment: - name: 'Production' - url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} - permissions: - id-token: write #This is required for requesting the JWT - - steps: - - name: Download artifact from build job - uses: actions/download-artifact@v4 - with: - name: python-app - - - name: Unzip artifact for deployment - run: unzip release.zip - - - - name: Login to Azure - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_9EB1C736CC6442EE8BB9ED5A1B39A4BD }} - tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_2735D429AD324C1DBC018F46DE446A50 }} - subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_689ECC40B2094F50A2974992721F47B8 }} - - - name: 'Deploy to Azure Web App' - uses: azure/webapps-deploy@v3 - id: deploy-to-webapp - with: - app-name: 'greengold' - slot-name: 'Production' - \ No newline at end of file