From a921413b0b8370a70d6cdc651b305d68b7484c07 Mon Sep 17 00:00:00 2001 From: "Md. Ariful Haque" Date: Sat, 20 May 2023 00:10:21 +0600 Subject: [PATCH 1/6] Add or update the Azure App Service build and deployment workflow config --- .../main_insightin-python-test-app.yml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/main_insightin-python-test-app.yml diff --git a/.github/workflows/main_insightin-python-test-app.yml b/.github/workflows/main_insightin-python-test-app.yml new file mode 100644 index 000000000..73f220b6c --- /dev/null +++ b/.github/workflows/main_insightin-python-test-app.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 - insightin-python-test-app + +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.9' + + - 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: 'insightin-python-test-app' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_2865B384A41940B2A5D4BE4CE509D6A3 }} From 427ba1877ad5c05ee07d17b184c165c1c1772271 Mon Sep 17 00:00:00 2001 From: "Md. Ariful Haque" Date: Sat, 20 May 2023 00:22:29 +0600 Subject: [PATCH 2/6] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/main_insightin-python-test-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main_insightin-python-test-app.yml b/.github/workflows/main_insightin-python-test-app.yml index 73f220b6c..51aa34f58 100644 --- a/.github/workflows/main_insightin-python-test-app.yml +++ b/.github/workflows/main_insightin-python-test-app.yml @@ -60,4 +60,4 @@ jobs: with: app-name: 'insightin-python-test-app' slot-name: 'Production' - publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_2865B384A41940B2A5D4BE4CE509D6A3 }} + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_B4A09F30C3C2475888E254CB0FEA2D5C }} From 82f54d1232c96620b08260c9ea2a5dbe5f2f79a6 Mon Sep 17 00:00:00 2001 From: "Md. Ariful Haque" Date: Sat, 20 May 2023 00:25:44 +0600 Subject: [PATCH 3/6] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/main_insightin-openai.yml | 63 +++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/main_insightin-openai.yml diff --git a/.github/workflows/main_insightin-openai.yml b/.github/workflows/main_insightin-openai.yml new file mode 100644 index 000000000..94ab18101 --- /dev/null +++ b/.github/workflows/main_insightin-openai.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 - insightin-openai + +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: 'insightin-openai' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_FB2ED6C73F754388B7590C8528FB3D1C }} From ef2511dc5b39d59a9b8c89822234e7aaecdb7a04 Mon Sep 17 00:00:00 2001 From: "Md. Ariful Haque" Date: Sat, 20 May 2023 00:31:54 +0600 Subject: [PATCH 4/6] Remove the Azure App Service build and deployment workflow config --- .../main_insightin-python-test-app.yml | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 .github/workflows/main_insightin-python-test-app.yml diff --git a/.github/workflows/main_insightin-python-test-app.yml b/.github/workflows/main_insightin-python-test-app.yml deleted file mode 100644 index 51aa34f58..000000000 --- a/.github/workflows/main_insightin-python-test-app.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 - insightin-python-test-app - -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.9' - - - 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: 'insightin-python-test-app' - slot-name: 'Production' - publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_B4A09F30C3C2475888E254CB0FEA2D5C }} From b9172c1158cde1ff1c51ddac9c96aac96da302a2 Mon Sep 17 00:00:00 2001 From: "Md. Ariful Haque" Date: Mon, 22 May 2023 13:48:43 +0600 Subject: [PATCH 5/6] Remove the Azure App Service build and deployment workflow config --- .github/workflows/main_insightin-openai.yml | 63 --------------------- 1 file changed, 63 deletions(-) delete mode 100644 .github/workflows/main_insightin-openai.yml diff --git a/.github/workflows/main_insightin-openai.yml b/.github/workflows/main_insightin-openai.yml deleted file mode 100644 index 94ab18101..000000000 --- a/.github/workflows/main_insightin-openai.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 - insightin-openai - -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: 'insightin-openai' - slot-name: 'Production' - publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_FB2ED6C73F754388B7590C8528FB3D1C }} From a1a6f83441638b96123a326bc5ff7be9257f0c85 Mon Sep 17 00:00:00 2001 From: "Md. Ariful Haque" Date: Mon, 22 May 2023 13:53:39 +0600 Subject: [PATCH 6/6] Add or update the Azure App Service build and deployment workflow config --- .../workflows/main_insightin-openai-fn.yml | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/main_insightin-openai-fn.yml diff --git a/.github/workflows/main_insightin-openai-fn.yml b/.github/workflows/main_insightin-openai-fn.yml new file mode 100644 index 000000000..0c43f92c5 --- /dev/null +++ b/.github/workflows/main_insightin-openai-fn.yml @@ -0,0 +1,70 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action +# More GitHub Actions for Azure: https://github.com/Azure/actions +# More info on Python, GitHub Actions, and Azure Functions: https://aka.ms/python-webapps-actions + +name: Build and deploy Python project to Azure Function App - insightin-openai-fn + +on: + push: + branches: + - main + workflow_dispatch: + +env: + AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root + PYTHON_VERSION: '3.10' # set this to the python version to use (supports 3.6, 3.7, 3.8) + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Setup Python version + uses: actions/setup-python@v1 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - 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 + + - name: Upload artifact for deployment job + 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-function.outputs.webapp-url }} + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v2 + with: + name: python-app + path: . + + - name: 'Deploy to Azure Functions' + uses: Azure/functions-action@v1 + id: deploy-to-function + with: + app-name: 'insightin-openai-fn' + slot-name: 'Production' + package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }} + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_C19D2366A36046DAA816B2D688759C5C }} + scm-do-build-during-deployment: true + enable-oryx-build: true