Ignorar Navegação

Deploy to Azure Button for Azure Websites

Publicado em 13 novembro, 2014

Software Engineer, Azure Websites
[Updated 11/17/2014 - Added link about custom ARM templates] 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. Deploy To Azure Button

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:
<a href="https://azuredeploy.net/" target="_blank">
    <img src="http://azuredeploy.net/deploybutton.png"/>

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:
<a href="https://azuredeploy.net/?repository=https://github.com/user/repo" target="_blank">
    <img src="http://azuredeploy.net/deploybutton.png"/>

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. For more information on this, check out this post on how to use custom ARM templates with the Deploy to Azure Button. Or for some quick examples of the azuredeploy.json file being used, here’s an MVC repository that adds an app setting to your site, and a more complex JabbR repository which installs a SQL Azure database dependency. If you want more details on how it works or would like to submit issues, all of the code for this project is hosted here: https://github.com/projectkudu/slingshot