For me, setting both of these environmental variables for my Web App solved the issue. Without them, the Azure Pipeline task AzureWebApp@1 was taking 40 minutes and then just failing.
{
name: 'ENABLE_ORYX_BUILD'
value: '0'
}
{ name: 'WEBSITE_RUN_FROM_PACKAGE', value: '1' }