Skip to content
Latchkey

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

Run this faster and cheaper on Latchkey managed runners. Start free →