Skip to content

Commit

Permalink
Update prod_bookheaded.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlosesposito22 authored Sep 28, 2024
1 parent a980b01 commit f9ae16c
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions .github/workflows/prod_bookheaded.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,21 @@ jobs:
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.)
run: pip install -r BookHeaded/requirements.txt

- name: Cleaning testing files
run: |
cd BookHeaded/
rm db.sqlite3
rm .env
cd ..
- name: Zip artifact for deployment
run: zip release.zip ./* -r
run: |
cd BookHeaded/
zip release.zip ./* -r
cd ..
mv BookHeaded/release.zip .
- name: Upload artifact for deployment jobs
uses: actions/upload-artifact@v4
Expand All @@ -49,8 +58,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 @@ -61,18 +70,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_789698FB3D5F4BFF94B9BBB9E4ECB7D6 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_8DB24EEC8D1D4337B3672A15A4AD0679 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_FFB99FA9EFEC482DAB6C56CE15119C1A }}

- 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 f9ae16c

Please sign in to comment.