I was deploying an Azure Function with Azure DevOps and was running into a problem where an extra folder was created at the root of the Files directory when deploying. It looked like this:
I discovered that in the deployment file the root directory was being included in the deployed zip file and needed to be excluded in order for the correct file structure to be created. You can see that I’ve indicated “includeRootFolder” as “false” below.
- task: ArchiveFiles@2
The full code to publish to an Azure Function through the build pipeline is here, so give it a shot if you are running into more problems.