Skip to content

Commit

Permalink
deployment passo 2
Browse files Browse the repository at this point in the history
  • Loading branch information
amanda-montarroios committed Sep 27, 2024
1 parent e11e850 commit 8fd8177
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions .github/workflows/main_bookheaded.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,30 +49,44 @@ 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
uses: actions/download-artifact@v4
with:
name: python-app

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

- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_D27119B9285846FC84413F360DD2C543 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_D5F1D643BAA9453C9D627C23CF1DCABE }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_B6E58B30AC954CF4904E6681575CE644 }}
- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_D27119B9285846FC84413F360DD2C543 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_D5F1D643BAA9453C9D627C23CF1DCABE }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_B6E58B30AC954CF4904E6681575CE644 }}

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

- name: Install dependencies
run: pip install -r bookheaded/requirements.txt

- name: Cleaning testing files
run: |
cd SEUPROJETODJANGO/
rm db.sqlite3
rm .env
cd ..

0 comments on commit 8fd8177

Please sign in to comment.