Deploy a multi project solution from GitHub with Azure Deployments
Azure has a nice, simple way to set up a Deployment Option that monitors our GitHub repository and deploys our code when we push commits to a certain branch. This works out of the box, once you’ve given Azure permission to access your GitHub repository, with very little fuss in the way of configuration set up.
This works swimmingly if we only have one web project in our solution, but that’s not always the case. A typical example of when we’d have more than one is a project for our website and a project for a separately hosted API, all within the same solution / git repository.
So what happens when we have multiple web projects in our repository, how can we tell Azure to publish the correct one for a particular web application?
Azure App Settings
Within the Azure Portal, navigate to your web app. Select the Application Settings from the blade and scroll down to the App Settings section. Here you can add the following App Setting which tells Azure which project it should deploy to this Web App.
Key: PROJECT
Value: [Path to .csproj file]
You can then set this PROJECT app setting on any of your other Azure Web Apps to deploy other projects within the same repository.
You can also create .deployment files into the root of your repository to achieve similar behaviour, but this only allows for one site to be set and also requires configuration to be added into source control, so for me the former is preferable.
Now you can configure each of your Azure Web Apps to deploy a specific project, push your changes to GitHub and have each application deploy the changes automatically. No more messing about having to publish each project individually. Nice and simple.
Further reading https://github.com/projectkudu/kudu/wiki/Customizing-deployments