From 64e459f0c6e959f318c7a8641b6880cdd955059a Mon Sep 17 00:00:00 2001 From: subhthakur <130888783+subhthakur@users.noreply.github.com> Date: Sun, 16 Apr 2023 14:21:07 +0800 Subject: [PATCH 1/4] update app.py --- app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app.py b/app.py index 7f8a1f2e8..077b302fb 100644 --- a/app.py +++ b/app.py @@ -4,3 +4,4 @@ @app.route("/") def hello(): return "Hello, World!" + From 284e2fde7e372860b35f776727743e6f142a5760 Mon Sep 17 00:00:00 2001 From: subhthakur <130888783+subhthakur@users.noreply.github.com> Date: Sun, 16 Apr 2023 14:49:39 +0800 Subject: [PATCH 2/4] Add or update the Azure App Service build and deployment workflow config --- .../master_voyager-delta-flyer01.yml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/master_voyager-delta-flyer01.yml diff --git a/.github/workflows/master_voyager-delta-flyer01.yml b/.github/workflows/master_voyager-delta-flyer01.yml new file mode 100644 index 000000000..edc77f63c --- /dev/null +++ b/.github/workflows/master_voyager-delta-flyer01.yml @@ -0,0 +1,63 @@ +# 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 - voyager-delta-flyer01 + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python version + uses: actions/setup-python@v1 + with: + python-version: '3.8' + + - 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: Upload artifact for deployment jobs + uses: actions/upload-artifact@v2 + with: + name: python-app + path: | + . + !venv/ + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v2 + with: + name: python-app + path: . + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v2 + id: deploy-to-webapp + with: + app-name: 'voyager-delta-flyer01' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_B31E7B81F28A4D9A8EB9B37B1F1D5CD8 }} From 7939b02cdaf8f21f0f9c3b047fff5edb6a218711 Mon Sep 17 00:00:00 2001 From: subhthakur <130888783+subhthakur@users.noreply.github.com> Date: Sun, 16 Apr 2023 15:01:35 +0800 Subject: [PATCH 3/4] Add or update the Azure App Service build and deployment workflow config --- .../master_voyager-delta-flyer01(staging).yml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/master_voyager-delta-flyer01(staging).yml diff --git a/.github/workflows/master_voyager-delta-flyer01(staging).yml b/.github/workflows/master_voyager-delta-flyer01(staging).yml new file mode 100644 index 000000000..2779ea468 --- /dev/null +++ b/.github/workflows/master_voyager-delta-flyer01(staging).yml @@ -0,0 +1,63 @@ +# 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 - voyager-delta-flyer01 + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python version + uses: actions/setup-python@v1 + with: + python-version: '3.8' + + - 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: Upload artifact for deployment jobs + uses: actions/upload-artifact@v2 + with: + name: python-app + path: | + . + !venv/ + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: 'staging' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v2 + with: + name: python-app + path: . + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v2 + id: deploy-to-webapp + with: + app-name: 'voyager-delta-flyer01' + slot-name: 'staging' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_13B85A9A53F4472FADDD93361126AA95 }} From bc074d9f6d040a19266251261addf0e91ef0ade8 Mon Sep 17 00:00:00 2001 From: subhthakur <130888783+subhthakur@users.noreply.github.com> Date: Sun, 16 Apr 2023 15:07:30 +0800 Subject: [PATCH 4/4] Remove the Azure App Service build and deployment workflow config --- .../master_voyager-delta-flyer01(staging).yml | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 .github/workflows/master_voyager-delta-flyer01(staging).yml diff --git a/.github/workflows/master_voyager-delta-flyer01(staging).yml b/.github/workflows/master_voyager-delta-flyer01(staging).yml deleted file mode 100644 index 2779ea468..000000000 --- a/.github/workflows/master_voyager-delta-flyer01(staging).yml +++ /dev/null @@ -1,63 +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 - voyager-delta-flyer01 - -on: - push: - branches: - - master - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Set up Python version - uses: actions/setup-python@v1 - with: - python-version: '3.8' - - - 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: Upload artifact for deployment jobs - uses: actions/upload-artifact@v2 - with: - name: python-app - path: | - . - !venv/ - - deploy: - runs-on: ubuntu-latest - needs: build - environment: - name: 'staging' - url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} - - steps: - - name: Download artifact from build job - uses: actions/download-artifact@v2 - with: - name: python-app - path: . - - - name: 'Deploy to Azure Web App' - uses: azure/webapps-deploy@v2 - id: deploy-to-webapp - with: - app-name: 'voyager-delta-flyer01' - slot-name: 'staging' - publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_13B85A9A53F4472FADDD93361126AA95 }}