diff --git a/.github/workflows/prod_bookheaded.yml b/.github/workflows/prod_bookheaded.yml index 837fc2b6..3eb749b8 100644 --- a/.github/workflows/prod_bookheaded.yml +++ b/.github/workflows/prod_bookheaded.yml @@ -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 @@ -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 @@ -61,13 +70,13 @@ jobs: - name: Unzip artifact for deployment run: unzip release.zip - - - 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: 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 @@ -75,4 +84,4 @@ jobs: with: app-name: 'Bookheaded' slot-name: 'Production' - \ No newline at end of file +