How to clean up wwwroot folder on the target Azure Websites Windows Server before each deployment in VSTS

前端 未结 3 1941
没有蜡笔的小新
没有蜡笔的小新 2021-02-02 10:50

After about a dozen deployments, the wwwroot directory is filled with a lot of files due to active development and deployments. We are using VSTS\'s Azure A

3条回答
  •  滥情空心
    2021-02-02 11:10

    For Web Deploy use answer by @Brendan Green.

    For Zip Deploy, from Kudu documentation:

    When a new build is deployed with zipdeploy, files and directories that were created by the previous deployment but are no longer present in the build will be deleted. Any other files and directories found in the site that aren't being overwritten by the deployment, such as those placed there via FTP or created by your app during runtime, will be preserved.

    https://github.com/projectkudu/kudu/wiki/Deploying-from-a-zip-file-or-url

    I think it's good enough for most cases.

提交回复
热议问题