We are deploying our Sitecore 9.2 app using Azure DevOps. More specifically we use WebDeploy and deployment slots and have noticed the following behaviour:
deployment to deployment slot takes an extended time (25+ mins), if the target slot has a different code-branch deployed
if we re-deploy to the same slot, without having swapped the target slot into production, the following deployment takes a short time(5-8 mins)
the majority of the files (all the sitecore files) have not changed between deployments
We can see that when our deployment takes a short time, there are few files updated and when deployment takes a long time, all the files (9000+) are updated. We are puzzled by the fact, that the Sitecore files are updated, since they are the only thing that does not change.
We have tried using webdeploy with -usechecksum parameter and without, but it does not result in any noticeable difference.
We also tried to deploy the application, without using deployment slots and that is always fast (5-7 mins).
Here is a screenshot of our deployment step: (Azure App Service deploy task v.4)
Is there a way to constantly achieve quick deployment times and use deployment slots?