I had just one commit with all my files. I pushed an empty commit, refreshed the page and it worked.

git commit --allow-empty -m "Trigger rebuild"
git push

If this doesn't work, as @Hendrikto pointed out in the comments, check out the Github status page and make sure GitHub Pages are operational.

Answer from Arnaud on Stack Overflow
🌐
GitHub
docs.github.com › en › pages › getting-started-with-github-pages › troubleshooting-404-errors-for-github-pages-sites
Troubleshooting 404 errors for GitHub Pages sites - GitHub Docs
If you are using a private repository for the GitHub Pages site, please check if your GitHub Pro, GitHub Team, or GitHub Enterprise Cloud subscription is still active. If you renew the plan, the GitHub Pages site will be automatically re-deployed.
Discussions

GitHub Pages deployment is not working
Select Topic Area Question Body Today I created a new public repository and added the code of my site to it. It has index.html the file (in the root directory), and on the local device, the site op... More on github.com
🌐 github.com
4
2
March 19, 2024
my github page doesn't work
I'm guessing that your first repository was named USERNAME.github.io , and when doing so GitHub Pages is automatically enabled. Your new repository has a different name, so you need to manually enable GitHub Pages. https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site More on reddit.com
🌐 r/github
7
0
February 11, 2024
GitHub pages won't show a new post
It seems like you're experiencing an issue with your GitHub Pages website not reflecting the changes you've made. There could be several reasons for this, and I'll outline some common troubleshooting steps to help you identify and resolve the problem: More on github.com
🌐 github.com
2
2
November 3, 2023
404 Error with my GitHub Page
Go to the project's "Settings" then "Pages" and under "branch" select "main" then save. More on reddit.com
🌐 r/github
13
0
March 31, 2024
🌐
GitHub
github.com › orgs › community › discussions › 57820
Websites deployed on GitHub Pages no longer functioning · community · Discussion #57820
Check for permission issues: Ensure that the permissions for your repository are set correctly. If you're using a private repository, check if the people who need access to the pages have the correct permissions.
🌐
GitHub
github.com › orgs › community › discussions › 68225
"Problem Loading Page" · community · Discussion #68225
September 25, 2023 - Clear Browser Cache: Sometimes, cached data in your browser can cause issues. Try clearing your browser's cache and cookies. Check GitHub Status: Occasionally, GitHub might experience downtime.
🌐
Reddit
reddit.com › r/github › my github page doesn't work
r/github on Reddit: my github page doesn't work
February 11, 2024 -

hello,
first, i want to state that i have absolutely no experience in coding or anything like that. i made a html site from scratch using youtube videos and some articles. it was supposed to be a valentine's day gift for my boyfriend (pics of us and some stories).
i launched the site using the steps from this doc https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages and at first it worked. but i decided to change my site a bit so i deleted the repository and created a new one with the same files with little changes in photos and text.
when i uploaded my first site there was this pop up (photo in post)

but when i deleted the page and did the same over again with the changed site, it didn't pop up and didn't publish. everything is the same in the code, i just changed text and photos. i don't know what to do please help

Find elsewhere
🌐
GitHub
github.com › orgs › community › discussions › 61073
Guide: Troubleshooting 404 errors for GitHub Pages sites · community · Discussion #61073
If your Pages site is private and you see a 404 error, you may need to clear your browser's cache. For more information on clearing your cache, see your browser's documentation. GitHub will look for an index.html file as the entry file for your site.
🌐
Maxim Orlov
maximorlov.com › deploying-to-github-pages-dont-forget-to-fix-your-links
Deploying to Github Pages? Don't Forget to Fix Your Links - Maxim Orlov
To better understand why links often break when deploying to Github Pages, first we need to learn what root-relative links are.
🌐
GitHub
docs.github.com › en › pages › setting-up-a-github-pages-site-with-jekyll › about-jekyll-build-errors-for-github-pages-sites
About Jekyll build errors for GitHub Pages sites - GitHub Docs
By default, your GitHub Pages site ... tool. To find potential build errors, you can check the workflow run for your GitHub Pages site by reviewing your repository's workflow runs....
🌐
Hashnode
muzardemoses.hashnode.dev › github-pages-not-displaying-my-website-heres-what-you-need-to-know
GitHub Pages Not Displaying My Website? Here's What You Need to Know
February 14, 2023 - Have you recently published a website using GitHub Pages, only to find that all you can see is the ReadMe file or 404 Page? Solution is here..
🌐
hack.write()
hackwrite.com › posts › github-pages-problem
The Problem with Github Pages | hack.write()
January 10, 2017 - With a little scripting, a little luck, and lot of commit privileges, this will work. However, the more complicated the documentation is, the longer the pull-build-push process takes. Combined with a large team, the potential for conflicts grows. The right solution is don't use Github pages.
🌐
codestudy
codestudy.net › blog › my-new-github-page-isn-t-showing-up
Why Isn't My New GitHub Page Showing Up? Troubleshooting Tips & Fixes — codestudy.net
Select "GitHub Pages" as the topic. ... Your repository URL. ... Screenshots of your Pages settings and build logs. Troubleshooting GitHub Pages usually boils down to checking build status, naming conventions, branch configuration, and caching.
🌐
GitHub
github.com › orgs › community › discussions › 67072
My page is most of the time down,....Is this normal ? · community · Discussion #67072
Remember that diagnosing website accessibility issues can sometimes require a bit of trial and error. Start by checking the basic configurations and settings, and if the issue persists, consider seeking support from GitHub. Beta Was this translation helpful? Give feedback. ... There was an error while loading. Please reload this page.
🌐
GitHub
github.com › orgs › community › discussions › 133297
Github pages returning "this site can't be reached" on all github.io repos · community · Discussion #133297
There was an error while loading. Please reload this page. ... So maybe the issue is with your network, maybe it's the firewall that isn't allowing connections to GitHub Pages hosted projects.