Reputation: 1299
My goal is to create an automated build/release pipeline that updates an Azure site every time I merge code in the GitHub project with the website.
I have a website in GitHub. A VSTS GitHub build task builds it successfully. A VSTS release task (Deploy Azure App Service) deploys the site to an Azure web app successfully. I know this because the Azure App Service Editor for the Azure app shows the website files in a subdirectory under wwwroot
. Because the files are deployed to a subdirectory rather than directly to wwwroot
, the site won't load. (To make sure the files themselves were not the problem, I manually added the same files in wwwroot
by generating new files with the built-in command prompt and copy/pasting in each file's content, and the site loaded fine.)
I have edited the release definition and created new releases many times but cannot figure out how to deploy directly to wwwroot
. Everything else in the pipeline works, including the automatic triggers.
The subdirectory's name matches the name of the build artifact download shown in the "Run on Agent" pane of the release definition. It also matches the name in the "Source Alias" field of the artifact used at the beginning of the release pipeline.
$(System.DefaultWorkingDirectory)/
is in the Package or folder field of the Deploy Azure App Service configuration settings.
How can I deploy the site to wwwroot
? Thank you for any insights.
Upvotes: 0
Views: 1627
Reputation: 1299
$(System.DefaultWorkingDirectory)/
was incorrect in the "Package or folder" field of the "Deploy Azure App Service" configuration settings. To resolve:
I incorrectly had selected "Linked artifacts."
What threw me off is that you select a subfolder to deploy to root, and you select the root linked artifact to deploy to a subfolder.
Upvotes: 1