@Allan Chong , Thanks for posting this question.
Firstly, apologies you're experiencing this issue.
Based on my understanding of your issue description- The error message "The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed', typically indicates that there was an issue with the deployment process. This error can occur due to a variety of reasons, including issues with the GitHub repository, issues with the Azure Web App, or issues with the deployment process itself.
The error message "Request failed with status code: 401 under 'Fetching changes' activity" indicates that there was an authentication issue when fetching changes from the GitHub repository. This error can occur if the credentials used to authenticate with the GitHub repository are incorrect or have expired.
To isolate the issue, you may try the following steps:
1.Verify the GitHub repo ( that you shared) to ensure that it is accessible and that the credentials used to authenticate with the repository are correct.
- Check the Azure Web App to ensure that it is properly configured and that there are no issues with the deployment process.
Additionally,
- (If you haven't tried this already) - Try disconnecting and reconnecting the GitHub repository to the Azure Web App to see if this resolves the issue.
- Review the deployment logs for the Azure Web App to see if there are any errors or issues that could be causing the deployment to fail.
Checkout the log directory/location info- Access log files -Enable and review logs to fetch more details about the error.
https://learn.microsoft.com/azure/app-service/troubleshoot-diagnostic-logs#access-log-files
Kindly let us know how it goes, I'll follow-up with you further.