From a37a53b4dc45ee06634351b57f8a60397f86940f Mon Sep 17 00:00:00 2001 From: Neil Peterson Date: Wed, 22 Feb 2023 22:08:50 -0800 Subject: [PATCH 1/4] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/main_example-32226.yml | 63 ++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/main_example-32226.yml diff --git a/.github/workflows/main_example-32226.yml b/.github/workflows/main_example-32226.yml new file mode 100644 index 000000000..1cd6eaaf9 --- /dev/null +++ b/.github/workflows/main_example-32226.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 - example-32226 + +on: + push: + branches: + - main + 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.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: 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: 'example-32226' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_0C2A8B611A2047DF92F97A9FA204140B }} From b98c197385294ab8c501cffdff4380f7fd08a453 Mon Sep 17 00:00:00 2001 From: Neil Peterson Date: Wed, 22 Feb 2023 22:17:18 -0800 Subject: [PATCH 2/4] Updating site --- templates/hello.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/hello.html b/templates/hello.html index c277e7740..c802550e7 100644 --- a/templates/hello.html +++ b/templates/hello.html @@ -1,6 +1,6 @@ - Hello Azure - Python Quickstart + Hello Neil - Python Quickstart From aacf3c78f2cd5498dc0c1bed67a42d790d6940e1 Mon Sep 17 00:00:00 2001 From: Neil Peterson Date: Wed, 22 Feb 2023 22:22:25 -0800 Subject: [PATCH 3/4] Updating site --- templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index 9cdba30cd..00e17bc6c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -10,7 +10,7 @@
Azure Logo -

Welcome to Azure

+

Welcome Neil

From 6690d8f16ebb34585553d0a53127520194176066 Mon Sep 17 00:00:00 2001 From: Neil Peterson Date: Wed, 22 Feb 2023 22:25:00 -0800 Subject: [PATCH 4/4] Updating site --- templates/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/index.html b/templates/index.html index 00e17bc6c..91093fa2b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -14,9 +14,9 @@

Welcome Neil

- + - +