Skip to content

Commit bd473a6

Browse files
committed
add deploy to azure button
1 parent 184d74d commit bd473a6

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: Deploy from GitHub
3+
description: Use deploy to Azure button to deploy templates in GitHub repository.
4+
ms.topic: conceptual
5+
ms.date: 01/31/2020
6+
---
7+
# Use button to deploy from GitHub repository
8+
9+
This article describes how to use the **Deploy to Azure** button to deploy templates from a GitHub repository. You can add the button directly to your GitHub repository or to a web page that references the repository.
10+
11+
## Use common image
12+
13+
To add the button to your web page or repository, use the image at:
14+
15+
`https://aka.ms/deploytoazurebutton`
16+
17+
The image appears as:
18+
19+
![Deploy to Azure button](https://aka.ms/deploytoazurebutton)
20+
21+
## Create URI for deploying template
22+
23+
Each link starts with the same base URI:
24+
25+
`https://portal.azure.com/#create/Microsoft.Template/uri/`
26+
27+
After that base, add the URL-encoded link to the raw template in GitHub. For example, to link to a template at:
28+
29+
`https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-aks/azuredeploy.json`
30+
31+
First, encode it.
32+
33+
`https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-aks%2Fazuredeploy.json`
34+
35+
Then, add it to the base URI.
36+
37+
`https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-aks%2Fazuredeploy.json`
38+
39+
## Add link
40+
41+
The link you add to your web page or GitHub repository contains the URI and the image.
42+
43+
```html
44+
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-aks%2Fazuredeploy.json" target="_blank">
45+
<img src="https://aka.ms/deploytoazurebutton"/>
46+
</a>
47+
```
48+
49+
You can deploy the example template with the following button:
50+
51+
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-aks%2Fazuredeploy.json" target="_blank">
52+
<img src="https://aka.ms/deploytoazurebutton"/>
53+
</a>
54+
55+
## Next steps
56+
57+
- To learn more about templates, see [Understand the structure and syntax of Azure Resource Manager templates](template-syntax.md).
58+

articles/azure-resource-manager/templates/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@
161161
- name: Deploy - REST API
162162
displayName: deployment
163163
href: deploy-rest.md
164+
- name: Deploy from GitHub
165+
href: deploy-to-azure-button.md
164166
- name: What-if deployment
165167
href: template-deploy-what-if.md
166168
- name: Redeploy on error

0 commit comments

Comments
 (0)