I see the "GitHub Pages" suggested a lot whenever this question comes up, but it's worth noting that it's against their ToS[0] to use it for commercial purposes:
"GitHub Pages is not intended for or allowed to be used as a free web hosting service to run your online business, e-commerce site, or any other website that is primarily directed at either facilitating commercial transactions or providing commercial software as a service (SaaS)."
So it's great if you want to host a personal site / blog or some other non-revenue-generating website, but for anything more than that you could run into issues.
In my opinion, there are some cases where it is a gray area: professional portfolio, case studies website with an email collection form, blog posts where you mention that you are a freelancer, a site where you link to your YouTube videos, some simple JavaScript app that don't require a backend but might make some money with ads...
So I'm just wondering how often they strike down at people who operate in this gray area.
That's a great point. I actually looked at GitHub pages and my main issue with it is there's no way to password lock the site. I don't need serious security here, but I also don't exactly want the entire world to see my HTML playground.
I'm not sure why they're doing it this way, it should be a nominal task to restrict viewers to those with read access to your repo, but I think it underscores the use cases they have in mind here. They want you to use it as a blog and not as a serious web hosting solution.
Even for private stuff you're under dictation of a 3rd party that decides what you're allowed to say to whom and who eavesdrops. US was once famous how they valued free speech. Tempi passati.
"GitHub Pages is not intended for or allowed to be used as a free web hosting service to run your online business, e-commerce site, or any other website that is primarily directed at either facilitating commercial transactions or providing commercial software as a service (SaaS)."
So it's great if you want to host a personal site / blog or some other non-revenue-generating website, but for anything more than that you could run into issues.
[0] https://docs.github.com/en/github/working-with-github-pages/...