diff --git a/.github/workflows/dev-api_my-muse.yml b/.github/workflows/dev-api_my-muse.yml index 17f5b3c..ad4676f 100644 --- a/.github/workflows/dev-api_my-muse.yml +++ b/.github/workflows/dev-api_my-muse.yml @@ -1,7 +1,3 @@ -# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy -# More GitHub Actions for Azure: https://github.com/Azure/actions -# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions - name: Build and deploy Python app to Azure Web App - My-muse on: @@ -28,10 +24,14 @@ jobs: source venv/bin/activate - name: Install dependencies - run: pip install -r requirements.txt + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt # Optional: Add step to run tests here (PyTest, Django test suites, etc.) - + - name: Compile Django bytecode + run: python manage.py compilemessages && python manage.py collectstatic --no-input + - name: Zip artifact for deployment run: zip release.zip ./* -r @@ -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 @@ -61,13 +61,13 @@ jobs: - name: Unzip artifact for deployment run: unzip release.zip - - - name: Login to Azure - uses: azure/login@v1 - with: - client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_192090912A8548FC8A6644F11C3B4395 }} - tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_19174D2D44C141D5A36680D7A680B900 }} - subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_EA6C4C8754D24166B9FD1E1EE1E7C37C }} + + - name: Login to Azure + uses: azure/login@v1 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_192090912A8548FC8A6644F11C3B4395 }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_19174D2D44C141D5A36680D7A680B900 }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_EA6C4C8754D24166B9FD1E1EE1E7C37C }} - name: 'Deploy to Azure Web App' uses: azure/webapps-deploy@v2