How to Deploy to App Service in Azure Pipelines
The AzureWebApp task pushes your package to App Service via a service connection.
Reference an Azure Resource Manager service connection, point the AzureWebApp task at your app name and package, and the task deploys and restarts the site.
Deploy a package to App Service
Provide the service connection, app name, and the built package path.
azure-pipelines.yml
steps:
- task: AzureWebApp@1
inputs:
azureSubscription: 'my-arm-connection'
appName: 'my-web-app'
package: '$(Pipeline.Workspace)/webapp/**/*.zip'
deploymentMethod: 'auto'Notes
- azureSubscription names an ARM service connection configured in project settings, not a literal subscription.
- Use a deployment job with an environment to add approvals in front of the App Service deploy.
Related guides
How to Use a Rolling Deployment Strategy in Azure PipelinesDeploy gradually across machines in Azure Pipelines using a deployment job with the rolling strategy so updat…
How to Set Pipeline-Level Variables in Azure PipelinesDefine variables at the pipeline level in Azure Pipelines so every job and step can read them with the $(Var)…