Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
To deploy the Python app from the GitHub repository shown in the screenshot to the existing Azure App Service (POS), use GitHub Actions from the Deployment Center.
- In Azure portal, open the POS Web App.
- In the left menu, under Deployment, select Deployment Center.
- In Source, select GitHub. Keep GitHub Actions as the build provider.
- Sign in to GitHub and authorize Azure if prompted.
- Select the Organization (GitHub account), then select the Repository that contains the Python app (for example, the
pos_v3_mauritiusrepo in the screenshot). - Select the correct Branch that should be deployed (for example,
mainor another branch that has the Python code). - Keep the option to Add a workflow enabled.
- For Authentication type, select User-assigned identity (or the default option offered in the portal).
- Select Save.
Azure App Service will commit a workflow file into the GitHub repository under .github/workflows. Every time code is pushed to the selected branch, GitHub Actions will build and deploy the Python app automatically to the POS Web App.
To monitor the deployment:
- In Deployment Center, select Logs.
- Open the latest run and then Build/Deploy Logs to go to GitHub and see the GitHub Actions run. Wait until the run completes successfully; then browse to the POS site URL shown in the Web App overview.
If deployment issues occur, use the troubleshooting guidance for Python on App Service referenced below.
References:
- Deploy a Python Django web app with PostgreSQL in Azure (azure-portal)
- Deploy a Python FastAPI web app with PostgreSQL in Azure (azure-portal)
- Quickstart: Deploy a Python (Django, Flask, or FastAPI) web app to Azure App Service
- Deploy Python web apps to App Service by using GitHub Actions (Linux)
- First look at deployment in Visual Studio