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 App Service Deploy task to deploy to Azure Websites Windows Server for a ASP.NET Web API project, is there a way to clean up the wwwroot
directory before deploying to the Avsts pre-deployment clean up?
Another trick to delete an entire Azure website deployment which can be done entirely in the Azure portal is: 1) Create a new empty deployment slot under the Azure website. 2) Swap it with the parent Azure website. That will give you an empty Azure website.
The task can be used to deploy to a range of Azure App Services such as: Web Apps on both Windows and Linux. Web Apps for Containers. Function Apps on both Windows and Linux.
What is Azure App Service? From the official product description, Microsoft Azure App Service is a fully managed platform for building, deploying, and scaling web apps. It is a PaaS (Platform as a service) that enables us to quickly deploy our app without worrying about infrastructure and performance.
Create your pipeline Sign in to your Azure DevOps organization and navigate to your project. Go to Pipelines, and then select New Pipeline. Walk through the steps of the wizard by first selecting GitHub as the location of your source code. You might be redirected to GitHub to sign in.
When using the Azure App Service Deploy task, and you are using the Publish using Web Deploy option, there is an additional option to Remove Additional Files at Destination.
If you check this option, the deployment process will remove any files at the destination where there is no corresponding file in the package that is being deployed.
In other words, it'll remove any left over files from a previous deployment that are no longer required.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With