Create deployments from Umbraco Cloud

Umbraco Cloud uses Azure to host Umbraco websites, so supporting deployment tracking pretty much corresponds to the steps specified in Using Kudu. Navigate to where your-umbraco-site is the name of your Umbraco site. Click the Debug console link and navigate to site\deployments\tools\PostDeploymentActions\deploymenthooks (create it if it doesn't exist). Notice the folder deploymenthooks, which is required for your scripts to run on Umbraco Cloud.

Unlike Kudu, Umbraco Cloud only executes cmd and bat files. Create a new cmd file:

touch create-deployment.cmd

with the following content:

echo "Creating deployment"


cd deploymenthooks

powershell -command ". .\create-deployment.ps1"

The script executes a PowerShell script, which we will create next:

touch create-deployment.ps1

The content of the PowerShell script looks a lot like in Using Kudu, but with some minor tweaks to support Umbraco Cloud:

$version = Get-Date -format u

$ProgressPreference = "SilentlyContinue"

$commitId = [System.Environment]::GetEnvironmentVariable("SCM_COMMIT_ID");
$deployUrl = "$commitId"

$username = "MY_USERNAME"
$password = "MY_PASSWORD"
$logId = "LOG_ID"
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))

$deployInfo = Invoke-RestMethod -Method Get -Uri $deployUrl -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)}

$url = ''
$body = @{
  version = $version
  description = $deployInfo.message
  userName = $
  userEmail = $deployInfo.author_email
  logId = $logId

[Net.ServicePointManager]::SecurityProtocol = `
Invoke-RestMethod -Method Post -Uri $url -Body $body

Replace your-umbraco-site with the name of your site, MY_USERNAME with your Umbraco Cloud username, MY_PASSWORD with your Umbraco Cloud password, LOG_ID with the id if the log that should contain the deployments (Where is my log ID?), and finally API_KEY with your API key, found and your organization settings page.

There you go. When deploying changes to your Umbraco Cloud site, a new deployment is automatically created on

This article was brought to you by the team. is the best error management system for .NET web applications. We monitor your website, alert you when errors start happening, and help you fix errors fast.

See how we can help you monitor your website for crashes Monitor your website