az webapp deploy: App Service Deploys & CI Errors
Deploy a zip, war, or static artifact to Azure App Service.
az webapp deploy pushes an application artifact to an Azure App Service web app. It is the modern replacement for az webapp deployment source config-zip and supports several artifact types.
What it does
az webapp deploy --resource-group <rg> --name <app> --src-path <file> uploads an artifact and deploys it to the web app, restarting it to pick up the new code. --type selects the artifact kind (zip, war, jar, static, startup), and --async lets the command return before the deploy fully completes.
Common usage
# Deploy a zip package
az webapp deploy \
--resource-group my-rg \
--name my-app \
--src-path app.zip --type zip
# Deploy a JAR (Java app)
az webapp deploy --resource-group my-rg --name my-app \
--src-path target/app.jar --type jarCommon error in CI: deploy succeeds but app 500s / SCM 401
The deploy reports success but the site returns HTTP 500 because the runtime stack or startup command is wrong, or the upload fails with "401 Unauthorized" from the Kudu/SCM endpoint when basic publishing is disabled. Fix: confirm the app’s runtime (az webapp config show) matches your artifact and set a correct --startup-file/startup command for the stack; for 401s, either authenticate with az login (the CLI uses your AAD token against SCM) or enable the SCM basic-auth publishing credential if your pipeline relies on it. Check live logs with az webapp log tail.
Key options
| Option | Purpose |
|---|---|
| --resource-group / -g | Resource group of the app |
| --name / -n | Web app name |
| --src-path | Artifact to deploy |
| --type | zip, war, jar, static, startup |
| --async | Return before deploy completes |