topic
topic

Reputation: 372

React app deployed to GitHub Pages gives "Site not found"

I'm trying to deploy a create-react-app to GitHub Pages, but I'm getting a 404.

404

There isn't a GitHub Pages site here.

What I've done:

The contents of /build folder is successfully pushed to master, but the site isn't accessible.

The repo's GitHub Pages settings simply says:

Your GitHub Pages site is currently being built from the master branch.

User pages must be built from the master branch.

I also tried some routing solutions (this and this) without making any difference, although I don't think they are ment to fix the problem I'm having.

I'm not sure how to troubleshoot this any further. Any ideas?

Upvotes: 2

Views: 3761

Answers (1)

topic
topic

Reputation: 372

Ok, so apparently you have to choose a GitHub Pages theme (even though you're not using it) in order for the page to be published. This seems very strange to me, and from what I can tell it's not at all mentioned in the documentation. 🤷‍♂️

Upvotes: 12

Related Questions