Deploying to Azure Websites from a Git repository just got a little easier with the Deploy to Azure Button. Simply place the button below in your README.md with a link to our site, and users who click on it will be directed to a streamlined deployment process. Checkout our Hello World repository for an example of how this is done.
Adding a button
To add a deployment button, insert the following markdown to your README.md file:
[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://azuredeploy.net/)
The README.md file also supports standard HTML tags, so you can provide your own button icon, or specify that you would like the button to open a new tab like so:
How it works
When a user clicks on the button, a “referrer” header is sent to azuredeploy.net which contains the location of the Git repository to deploy from. If you would like to host the button somewhere outside of your Git repository, you can specify a query string in the target URL like so:
Using a custom Azure Resource Manager template
By default, the ARM template being used is a simple site template with a repository. However you can specify a custom ARM template by adding a file called “azuredeploy.json” to the root of your repository. Here’s a simple example that adds an app setting to your site, and here’s a more complex example which installs JabbR with a SQL Azure database dependency.
If you want more details on how it works, all of the code for this project is hosted here: https://github.com/projectkudu/slingshot