Continuous Deployment from GitHub, the web based Git source repository service to Azure, the cloud offering from Microsoft, resolves many bottlenecks related to manual application deployment. Most of the open source developers use GitHub as a public or private repository to track code changes and as a collaboration tool. Integrating or deploying applications directly from GitHub to Azure reduce the time taken for manual deployment of applications.
Let us quickly see how we can deploy a small HTML based website into Azure.
1. Create an account in GitHub
Navigate to GitHub (https://github.com/) and Sign up, if you don’t have an account in GitHub; otherwise Sign in to GitHub with your existing GitHub account.
2. Create a repository in GitHub
Let us create a sample repository in GitHub to host sample web application. Click on the plus (+) sign on right top corner and select the New repository option from the drop-down menu.
Provide a repository name and select the Initialize this repository with a ReadMe option, if required.
Click on Create repository to create the sample repository.
3. Create an html file in GitHub
Let us create a simple HTML file to understand how the continuous deployment work in Azure websites. Click on Create new file button on top of the file list in the newly created repository.
As always, let us start our journey with a Hello World code snippet
Click on Commit new file to create home.html file.
4. Login to Azure
5. Create a Website in Azure
Click on the plus (+) sign on top of the left navigation menu to start creating a new resource. Select Web +Mobile option from the list and then select Web App for creating a new Web application in Azure.
Provide application name, select subscription and resource group. Either create a new resource group or use an existing one. Click on Create to complete the operation.
6. Configure GitHub under Deployment options
Select the newly created web application from the list of web applications and select the Deployment options section.