Deploy to Azure App Service
The deploy-to-azure.yaml is configured to run after a successful Build, Test, and Publish workflow run. It takes the build artifact and publishes it to an Azure App Service.
It is disabled by default.
Usage
- Set up your Azure environment (app service and database).
- Create a repo secret
AZURE_APP_SERVICE_NAMEand set it to the name of your app service (likemy-app-service). - Create a repo secret
AZURE_WEBAPP_PUBLISH_PROFILEand paste in the contents of your downloaded publish profile. - Create a repo variable
RUN_DEPLOY_TO_AZURE_APP_SERVICEand set it totrue.
Scaling and Distributed Deployment
For high-availability deployments, you can scale your Azure App Service to multiple instances. When running multiple instances:
- Enable distributed mode by setting
UseDistributedModetotruein your application configuration. - Configure a Redis cache (Azure Cache for Redis) and set the connection string in your app service environment variables.
- Ensure your database supports concurrent access, as migrations and seeding will be coordinated across instances.
This setup allows multiple backend instances to share cache and SignalR connections, providing a scalable and resilient deployment.