forked from Azure/azure-docs-powershell-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
48 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
app-service/deploy-github-continuous/deploy-github-continuous.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
$gitrepo="<Replace with your GitHub repo URL>" | ||
$gittoken="<Replace with your GitHub token>" | ||
$webappname="mywebapp$(Get-Random)" | ||
$location="West Europe" | ||
|
||
# Create a resource group. | ||
New-AzureRmResourceGroup -Name myResourceGroup -Location $location | ||
|
||
# Create an App Service plan in Free tier. | ||
New-AzureRmAppServicePlan -Name $webappname -Location $location ` | ||
-ResourceGroupName myResourceGroup -Tier Free | ||
|
||
# Create a web app. | ||
New-AzureRmWebApp -Name $webappname -Location $location -AppServicePlan $webappname ` | ||
-ResourceGroupName myResourceGroup | ||
|
||
# SET GitHub | ||
$PropertiesObject = @{ | ||
#Property = $token; | ||
} | ||
Set-AzureRmResource -PropertyObject $PropertiesObject ` | ||
-ResourceId /providers/Microsoft.Web/sourcecontrols/GitHub -ApiVersion 2015-08-01 -Force | ||
|
||
# Configure GitHub deployment from your GitHub repo and deploy once. | ||
$PropertiesObject = @{ | ||
repoUrl = "$gitrepo"; | ||
branch = "master"; | ||
} | ||
Set-AzureRmResource -PropertyObject $PropertiesObject -ResourceGroupName myResourceGroup ` | ||
-ResourceType Microsoft.Web/sites/sourcecontrols -ResourceName $webappname/web ` | ||
-ApiVersion 2015-08-01 -Force | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters