Pages

Saturday, November 28, 2015

Auto Deployment with GitHub in Azure

Deployment is always one of the tedious task, which every developer face in his carrier. But In the era of Azure, Microsoft give a nice ways to get rid of this manual work, so today I will show you how to deploy website from Git-Repository.

Prerequisite
  1. Valid Azure account
  2. Git repository

Following are the steps.
  • Commit your code in Git Repository
  • Open Azure portal and click on Web Apps

  • Add Url, select the location where you want to deploy and select the database (if any), make sure to check the checkbox "Publish from source control".
  • Now select the GitHub and verify you credentials of GitHub.
  • Now select the repository which you want to deploy and also select the branch from which you need to deploy your code. 
  • Once you done with that, deployment will start and in the status bar you will get the status of the deployment. after few minutes your deployment will be successful
Once your deployment is complete you can check the status of the deployment on clicking the deployment tab.

The beauty of this concept is, after each GitHub commit. Azure push a latest build on the server and you can get rid of manual deployment of pushing build on Azure server.