Skip to content

Commit

Permalink
Add or update the Azure App Service build and deployment workflow config
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlosesposito22 committed Sep 28, 2024
1 parent 8562728 commit cd96d0b
Showing 1 changed file with 14 additions and 23 deletions.
37 changes: 14 additions & 23 deletions .github/workflows/prod_bookheaded.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,12 @@ jobs:
source venv/bin/activate
- name: Install dependencies
run: pip install -r BookHeaded/requirements.txt

- name: Cleaning testing files
run: |
cd BookHeaded/
rm db.sqlite3
rm .env
cd ..
run: pip install -r requirements.txt

# Optional: Add step to run tests here (PyTest, Django test suites, etc.)

- name: Zip artifact for deployment
run: |
cd BookHeaded/
zip release.zip ./* -r
cd ..
mv BookHeaded/release.zip .
run: zip release.zip ./* -r

- name: Upload artifact for deployment jobs
uses: actions/upload-artifact@v4
Expand All @@ -58,8 +49,8 @@ jobs:
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
permissions:
id-token: write #This is required for requesting the JWT
permissions:
id-token: write #This is required for requesting the JWT

steps:
- name: Download artifact from build job
Expand All @@ -70,18 +61,18 @@ jobs:
- name: Unzip artifact for deployment
run: unzip release.zip


- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_789698FB3D5F4BFF94B9BBB9E4ECB7D6 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_8DB24EEC8D1D4337B3672A15A4AD0679 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_FFB99FA9EFEC482DAB6C56CE15119C1A }}

- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_7461123FDCA244FCBF2DC7FDFB543C1D }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_44EBD862C3CA49B085FA994635E2F5FA }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_0B1C3726C3EA4EF9A8E00A258F06E718 }}

- name: 'Deploy to Azure Web App'
uses: azure/webapps-deploy@v3
id: deploy-to-webapp
with:
app-name: 'Bookheaded'
slot-name: 'Production'


0 comments on commit cd96d0b

Please sign in to comment.