Deploy a website to Azure using GitHub

Picture this scenario:

I want to create a website and use GitHub for source control. How can I have Azure websites point to my GitHub account and pull the code from there?

Why do this?

With this setup, I can make changes to my code base, from any machine in the world and push it to GitHub. The moment is gets pushed to GitHub, my website is updated.

Here’s how to make that happen:

Azure App Service supports continuous deployment to Web Apps from source code control and repository tools like BitBucket, CodePlex, Dropbox, Git, GitHub, Mercurial, and TFS. You can use these tools to maintain the content and code for your application, and then quickly and easily push changes to your Azure web app when you want.

Create an empty website on Azure.

Azure-GitHub-1

Push your web code from your local Git repository to one on GitHub.

From with in the Azure portal, click on your newly created website, followed by Deployments -> Set up continuous deployment.

Azure-GitHub-2

At the next screen, you’ll be prompted to select your source. Select GitHub.
 

Azure-GitHub-3

 

You’ll be prompted to enter your credentials.

Select the repository you’d like to monitor, and if possible, the branch.

Azure-GitHub-4

 

In a few moments Azure will pull the code from your GitHub repository, and you’ll be good to go!

You are not limited to GitHub, though. You can also deploy from BitBucket, CodePlex, Dropbox, GitHub, or Mercurial results in a continuous deployment process where Azure will pull in the most recent updates from your project, nearly instantly.

Next Steps

What if you wanted to turn this website into a mobile app on iOS, Android, and WIndows? Well we can do that with ManifoldJS.

 

Any questions? Send me a message!

-----------------------


subscribe-to-youtube

Leave a Reply