Sitemap (XML) partially works on GitHub Pages and cannot be fetched by Google Search Console

Hello,

I have a site with a custom domain hosted on GitHub Pages. I’ve added a sitemap file to my repository with the name sitemap.xml. I am able to access it by going to https://highlight.eu.org/sitemap; however, https://highlight.eu.org/sitemap.xml returns a 404 error.

Furthermore, when I try to add the aforementioned sitemap to Google Search Console, it cannot fetch it. I’ve tried both URLs and neither works.

I am not using Jekyll or any other framework. What can I do?

Thank you for any answers in advance!

Adding a .nojekyll file to my repository solved the problem. I guess GitHub Pages assumed I was using Jekyll and incorrectly compiled my website.