diff --git a/.github/workflows/main_bookheaded.yml b/.github/workflows/main_bookheaded.yml index 8968733f..a8728437 100644 --- a/.github/workflows/main_bookheaded.yml +++ b/.github/workflows/main_bookheaded.yml @@ -49,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 @@ -58,16 +58,20 @@ jobs: 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 @@ -75,4 +79,14 @@ jobs: 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 .. \ No newline at end of file