title: Azure PowerShell Script Sample - Create a web app with continuous deployment from GitHub | Microsoft Docs description: Azure PowerShell Script Sample - Create a web app with continuous deployment from GitHub services: app-service\web documentationcenter: author: cephalin manager: erikre editor: tags: azure-service-management
ms.assetid: 42f901f8-02f7-4869-b22d-d99ef59f874c ms.service: app-service-web ms.workload: web ms.devlang: na ms.topic: sample ms.date: 03/20/2017 ms.author: cephalin ms.custom: 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.
If needed, install the Azure PowerShell using the instruction found in the Azure PowerShell guide, and then run
Connect-AzureRmAccount to create a connection with Azure. Also, ensure that:
- A connection with Azure has been created using the
- The application code is in a public or private GitHub repository that you own.
- You have created an access token in your GitHub account.
Clean up deployment
After the script sample has been run, the following command can be used to remove the resource group, web app, and all related resources.
Remove-AzureRmResourceGroup -Name myResourceGroup -Force
This script uses the following commands. Each command in the table links to command specific documentation.
|New-AzureRmResourceGroup||Creates a resource group in which all resources are stored.|
|New-AzureRmAppServicePlan||Creates an App Service plan.|
|New-AzureRmWebApp||Creates a web app.|
|Set-AzureRmResource||Modifies a resource in a resource group.|
For more information on the Azure PowerShell module, see Azure PowerShell documentation.
Additional Azure Powershell samples for Azure App Service Web Apps can be found in the Azure PowerShell samples.