We use Azure DevOps pipes that do exactly what you describe. AppOffline, deploy, remove superfluous files, AppOnline. If there are alot of log/temp/cache files the deployment can take a few minutes, but we don't watch it happen, and we deploy at times when it doesn't matter, so the process works fine for us.