Another possible issue is that the appType property for your AzureFunctionApp@2 task has the wrong value.
If you're deploying to a Linux app service plan, it should be functionAppLinux while if you're deploying to Windows, it should be functionApp. I was wondering why deployment succeeds but wwwroot is empty, and it turned out that this was the issue...