@epicme It seems like you’ve set up your GitHub Actions workflow correctly for deploying a Python FastAPI application to Azure App Service. However, if the deployment is stuck at the “deploy” task, there are a few potential issues to consider:
- SCM_DO_BUILD_DURING_DEPLOYMENT: This environment variable triggers the build process during the deployment phase. If the build process is taking too long or encountering errors, it could cause the deployment to hang. You can check the logs in the Azure Portal under your App Service’s “Deployment Center” to see if there are any build errors.
- Deployment Script: Sometimes, the default deployment script may not suit the specific needs of your application. You can customize the deployment script according to your application’s requirements. For example, you might need to modify the startup command or include additional steps for database migrations.
- Service Limits: Check if there are any service limits being hit, such as storage space or memory. Although less likely, it’s good to rule out these possibilities.
- Deployment Configuration: Ensure that the deployment configuration in the Azure Portal is correctly set up. This includes the deployment method, source control options, and any additional deployment settings.
- WebApp Configuration: Verify that the configuration settings of the Azure Web App match the requirements of your application, such as the correct Python version and any necessary application settings.
- Zip Deployment: If you’re using ZipDeploy, ensure that the zip file structure is correct and that all necessary files are included. The
WEBSITE_RUN_FROM_PACKAGE
setting can also be used to run the app directly from a zip file, which might help in certain scenarios. - Permissions: Make sure that the service principal used for deployment has the correct permissions. The client ID, tenant ID, and subscription ID should have the necessary roles assigned for deployment.
Let us know the outcome of the above suggestions and if we can assist you further.