Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force
Connect-AzAccount
Get-AzSubscription
subscription=“Azure subscription 1” az account set -s “$subscription”
let “randomIdentifier=$RANDOM*$RANDOM” location=“East US” resourceGroup=“msdocs-app-service-rg-$randomIdentifier” tag=“deploy-github.sh” gitrepo=https://github.com/Azure-Samples/php-docs-hello-world # Replace the following URL with your own public GitHub repo URL if you have one appServicePlan=“msdocs-app-service-plan-$randomIdentifier” webapp=“msdocs-web-app-$randomIdentifier”
echo “Creating $resourceGroup in “$location”…” az group create –name $resourceGroup –location “$location” –tag $tag
FREE
tier.echo “Creating $appServicePlan” az appservice plan create –name $appServicePlan –resource-group $resourceGroup –sku FREE
echo “Creating $webapp” az webapp create –name $webapp –resource-group $resourceGroup –plan $appServicePlan
az webapp deployment source config –name $webapp –resource-group $resourceGroup
–repo-url $gitrepo –branch master –manual-integration
site=“http://$webapp.azurewebsites.net” echo $site curl “$site” # Optionally, copy and paste the output of the previous command into a browser to see the web app