Why do you even need a CDN? GitHub will host static sites for free and updating is a git push. S3 will as well for pennies a month unless your site is huge.
I don't believe you can use HTTPS with a custom domain (a domain that doesn't end in github.io or amazonaws.com), with GitHub pages or S3.
Two free choices I'm aware of, for hosting at a URL that both future-proofs your choice of hosting provider and provides end-to-end encryption to site visitors, are the free CloudFlare plan in front of GitHub or S3 (or any other static hosting service), and the free hosting plan on Netlify.
You can, we use S3 at my company to host a site used by pathologists to sign out reports. How we did that... I'd have to ask my coworker, but we have https and a custom domain.
It looks[1] like you can use Cert Manager with CloudFront[2], but not directly with S3.
CloudFront is very cheap[3], but it is not free. (For that matter, S3 itself is cheap but not free.) It's therefore a solution to “I'm employed in a developed nation and don't want to notice that I'm paying for hosting”, but not to “I have literally no money to spare for hosting because a year is less than coffee” or “I want my content to stay up without my having to remember to keep a valid credit card on file somewhere”.
[2] CloudFront ≠ CloudFlare. Nobody in this thread has been confused about this, but it tends to trip people up.
[3] I ran tech ops for a company whose site was, on launch day, around the 55th-most-popular site on the internet. I think our CloudFront bill was $300 for that day.
There is some bandwidth limit, though, and with CDN your site could also get better response times, since they will serve content from a server with better proximity to visitors.
Is there a practical limit for gh-pages though? I think you get flagged for manual review if you're high traffic; but as long as you're serving content I don't know of anyone being taken down (and I have heard about some great lengths gone to to keep things up).
And you can put a CDN in front of gh-pages too! I have done that with cloudflare a couple of times for relatives that want to run a static site and super low cost.
Does GitHub not push its static content from a traditional CDN, or something effectively simulating a CDN (just a lot of servers spread across the globe)? I don't know offhand, it'd be surprising if they don't given the scale in question.
“Cool, where’d you go?”
“GitHub pages.”
“...”