Skip to content

Instantly share code, notes, and snippets.

@rmacfie
Last active November 14, 2015 18:16
Show Gist options
  • Save rmacfie/2e20fdbec54eceb6161c to your computer and use it in GitHub Desktop.
Save rmacfie/2e20fdbec54eceb6161c to your computer and use it in GitHub Desktop.
Simple folder deploy through Web Deploy (MSDeploy)
:: The following variables are required:
SET AZDEPLOY_SOURCE=C:\Apps\myapp\dist
SET AZDEPLOY_APP=myapp
SET AZDEPLOY_PASSWORD=mypassword
:: The password can be extracted from the publish settings you download from the Azure portal
msdeploy.exe ^
-verb:sync ^
-source:contentPath="%AZDEPLOY_SOURCE%" ^
-dest:contentPath="%AZDEPLOY_APP%",ComputerName="https://%AZDEPLOY_APP%.scm.azurewebsites.net:443/msdeploy.axd?site=%AZDEPLOY_APP%",UserName="$%AZDEPLOY_APP%",Password="%AZDEPLOY_PASSWORD%",AuthType="Basic"
:: If you have an ASP.NET 5 project with an approot/wwwroot separation you need the "contentLibExtension"
:: The source variable should point to the wwwroot directory
msdeploy.exe ^
-verb:sync ^
-source:contentPath="%AZDEPLOY_SOURCE%" ^
-dest:contentPath="%AZDEPLOY_APP%",ComputerName="https://%AZDEPLOY_APP%.scm.azurewebsites.net:443/msdeploy.axd?site=%AZDEPLOY_APP%",UserName="$%AZDEPLOY_APP%",Password="%AZDEPLOY_PASSWORD%",AuthType="Basic" ^
-enableLink:contentLibExtension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment