Upon reading the create-react-app docs, I only know how to deploy via gh-pages by adding a "homepage" section in my package.json. However, that requires the domain name to be <username>.github.io/<repository_name>. I want to deploy via master, with my domain name being <username>.github.io, but Github isn't reading my /build folder correctly. My site is just showing the README.md file.
How do I force Github to look at my /build folder and display my site? I tried renaming /build to /docs which didn't work either.
There's a workaround here.
"deploy": "gh-pages -b master -d build".That's all that is necessary. I just tested this a few minutes ago and it seems to be working just fine.
It would be nice if this case could be documented somewhere or even have the recommended script during build changed to this if the user is specifying a GitHub user page, instead of project page.
I'm no expert with gh-pages, but if this situation is unique as @aaronlna described I'd be open to a docs modification for this specific case.
Pull request: #3510
Since the PR has been merged I believe this can be closed 馃檪
Thanks @denkristoffer !
Most helpful comment
There's a workaround here.
"deploy": "gh-pages -b master -d build".That's all that is necessary. I just tested this a few minutes ago and it seems to be working just fine.
It would be nice if this case could be documented somewhere or even have the recommended script during build changed to this if the user is specifying a GitHub user page, instead of project page.