@Srikanth Vanam (PERSISTENT SYSTEMS LIMITED) Thank you for reaching out to Microsoft Q&A, apologize for any inconvenience any inconvenience caused on this.
Thanks for your time over the offline discussion. I am summarizing our discussion and posting the same for the benefit of other community members.
Issue : Customer is trying to deploy his application to app service using continuous deployment with azure devops pipeline through web deploy. Deployment is getting succeeded post restarting the app service manually they are able to see the published content. Also, customer want to know why the webdeploy didn't restarted the webapp.
Solution:
- Both Web deploy, Zip deploy deployment methods will restart the app service.
- It is recommended to use Run from package, the files in the package are not copied to the wwwroot directory. Instead, the ZIP package itself gets mounted directly as the read-only wwwroot directory. Refer to this documentation for more information about run from package and its benefits.
- Upon investigating deeper, we found that the customer's app service has local cache enabled. During deployment, the content in the remote storage or remote content share was updated, but it did not update the app service content folder. This is why the customer is unable to see the deployed content.
- Suggested them to add one more CLI task in their azure devops release pipeline to restart the web app using the cmdlets az webapp restart or restart-azwebapp.
Hope this helps, let me know if you have any further questions on this.