I am running a custom ARM template to create the infrastructure (Dynamic App Service plan, Storage account etc.) for an Azure function through an Azure DevOps Pipeline.
I am also deploying my function code via Azure DevOps from a different Github repo in a different Azure DevOps pipeline.
After I've successfully deployed the infrastructure and code if the pipeline for the infrastructure runs again it deletes the code, even if the changes I am making to the infrastructure don't effect the function and I run in Incremental mode.