Skip to content

Files

Latest commit

 

History

History
56 lines (40 loc) · 2.77 KB

app-service-cli-continuous-deployment-github.md

File metadata and controls

56 lines (40 loc) · 2.77 KB
title description services documentationcenter author manager editor tags ms.assetid ms.service ms.workload ms.devlang ms.tgt_pltfrm ms.topic ms.date ms.author ms.custom
Azure CLI Script Sample - Create a web app with continuous deployment from GitHub | Microsoft Docs
Azure CLI Script Sample - Create a web app with continuous deployment from GitHub
app-service\web
cephalin
erikre
azure-service-management
0205c991-0989-4ca3-bb41-237dcc964460
app-service-web
web
azurecli
na
sample
12/11/2017
cephalin
mvc

Create a web app with continuous deployment from GitHub

This sample script creates a web app in App Service with its related resources, and then sets up continuous deployment from a GitHub repository. For GitHub deployment without continuous deployment, see Create a web app and deploy code from GitHub. For this sample, you need:

  • A GitHub repository with application code, that you have administrative permissions for.
  • A Personal Access Token (PAT) for your GitHub account.

[!INCLUDE quickstarts-free-trial-note]

[!INCLUDE cloud-shell-try-it.md]

If you choose to install and use the CLI locally, you need Azure CLI version 2.0 or later. To find the version, run az --version. If you need to install or upgrade, see Install the Azure CLI.

Sample script

[!code-azurecli-interactivemain]

[!INCLUDE cli-script-clean-up]

Script explanation

This script uses the following commands. Each command in the table links to command specific documentation.

Command Notes
az group create Creates a resource group in which all resources are stored.
az appservice plan create Creates an App Service plan.
az webapp create Creates an Azure web app.
az webapp deployment source config Associates an Azure web app with a Git or Mercurial repository.

Next steps

For more information on the Azure CLI, see Azure CLI documentation.

Additional App Service CLI script samples can be found in the Azure App Service documentation.