From 5ed34e290e077a5a0146da0586ff2f928b5e9a87 Mon Sep 17 00:00:00 2001 From: shylajar28 Date: Wed, 29 Jan 2025 15:38:09 -0800 Subject: [PATCH 1/3] Create Test --- ProjScreenshots/Test | 1 + 1 file changed, 1 insertion(+) create mode 100644 ProjScreenshots/Test diff --git a/ProjScreenshots/Test b/ProjScreenshots/Test new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/ProjScreenshots/Test @@ -0,0 +1 @@ +test From 905a1437893625e4344ce19ce994fcc6d967e3cf Mon Sep 17 00:00:00 2001 From: shylajar28 Date: Wed, 29 Jan 2025 17:21:29 -0800 Subject: [PATCH 2/3] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/patch-2_udacitycms12425.yml | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .github/workflows/patch-2_udacitycms12425.yml diff --git a/.github/workflows/patch-2_udacitycms12425.yml b/.github/workflows/patch-2_udacitycms12425.yml new file mode 100644 index 000000000..0fa019564 --- /dev/null +++ b/.github/workflows/patch-2_udacitycms12425.yml @@ -0,0 +1,79 @@ +# 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 - udacitycms12425 + +on: + push: + branches: + - patch-2 + 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.10' + + - 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 + + 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: Unzip artifact for deployment + run: unzip release.zip + + + - name: Login to Azure + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_8D5936FEB4584AA89F64B944585A5910 }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_2897892A2A2F44A0A33F29FFFFB3A309 }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_299643317452414DB86B31A06D297F7A }} + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v3 + id: deploy-to-webapp + with: + app-name: 'udacitycms12425' + slot-name: 'Production' + \ No newline at end of file From d9ff648ea23b000ee79792df75c7cefec3c49954 Mon Sep 17 00:00:00 2001 From: shylajar28 Date: Wed, 29 Jan 2025 17:24:50 -0800 Subject: [PATCH 3/3] Remove the Azure App Service build and deployment workflow config --- .github/workflows/patch-2_udacitycms12425.yml | 79 ------------------- 1 file changed, 79 deletions(-) delete mode 100644 .github/workflows/patch-2_udacitycms12425.yml diff --git a/.github/workflows/patch-2_udacitycms12425.yml b/.github/workflows/patch-2_udacitycms12425.yml deleted file mode 100644 index 0fa019564..000000000 --- a/.github/workflows/patch-2_udacitycms12425.yml +++ /dev/null @@ -1,79 +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 - udacitycms12425 - -on: - push: - branches: - - patch-2 - 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.10' - - - 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 - - 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: Unzip artifact for deployment - run: unzip release.zip - - - - name: Login to Azure - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_8D5936FEB4584AA89F64B944585A5910 }} - tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_2897892A2A2F44A0A33F29FFFFB3A309 }} - subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_299643317452414DB86B31A06D297F7A }} - - - name: 'Deploy to Azure Web App' - uses: azure/webapps-deploy@v3 - id: deploy-to-webapp - with: - app-name: 'udacitycms12425' - slot-name: 'Production' - \ No newline at end of file