Skip to content
Latchkey

az webapp deploy: Deploy App Service in CI

Deploy an artifact (zip, war, jar, static) to an Azure App Service web app.

az webapp deploy pushes a build artifact to App Service using the Kudu deployment endpoint. In CI you build, package a zip, then deploy it to a named app and resource group. It replaces the older az webapp deployment source commands for artifact pushes.

Common flags

  • --name APP and --resource-group RG - target web app
  • --src-path PATH - local artifact to deploy
  • --type zip - artifact type (zip, war, jar, static, startup)
  • --async true - return without waiting for completion

Example in CI

Deploy a packaged zip to the web app.

shell
az webapp deploy \
  --resource-group my-rg --name my-app \
  --src-path build.zip --type zip

Common errors in CI

  • ResourceNotFound: ... site ... could not be found - wrong app name or resource group
  • Deployment failed because the site ... returned 401 - SCM auth disabled or SP lacks Contributor
  • An error occurred during deployment ... 409 Conflict - a deployment is already in progress

Key takeaways

  • Pushes a build artifact to App Service via the Kudu endpoint.
  • Set --type to match the artifact (zip is the common case).
  • App-name/resource-group mismatches and missing Contributor role are the usual failures.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →