Azure App Service Operations
Deploy and manage Azure App Service web applications.
Operations
| Operation | Description |
|---|---|
AppService.DeployZip | Deploy an app service using zip deploy. |
AppService.DeployWithSwap | Deploy to a slot then swap to production (zero-downtime). |
AppService.SwapSlots | Swap deployment slots. |
AppService.CreateSlot | Create a new deployment slot. |
AppService.DeleteSlot | Delete a deployment slot. |
AppService.ListSlots | List deployment slots for an app service. |
AppService.Restart | Restart an app service. |
AppService.Start | Start an app service. |
AppService.Stop | Stop an app service. |
Example
Deploy a web app with zero-downtime using deployment slots.
build.ando
// Build and publish the web app
var WebApp = Project.From("./src/WebApp/WebApp.csproj");
Dotnet.Publish(WebApp, o => o
.Output(Root / "publish")
.WithConfiguration(Configuration.Release));
// Create zip for deployment
Artifact.Zip(Root / "publish", Root / "app.zip");
// Deploy to staging slot, then swap to production
AppService.DeployWithSwap("my-web-app", Root / "app.zip");
// Or deploy directly to a specific slot
AppService.DeployZip("my-web-app", Root / "app.zip", "my-rg", o => o
.WithDeploymentSlot("staging"));