DEV Community

Discussion on: How to deploy React App to GitHub Pages

Collapse
 
eimert profile image
Eimert Vink

Hello everbody,

I fixed the 404: "I ran into this problem myself and finally discovered a simpler solution. The problem is that Jekyll ignores all files that start with _. The simple solution is to add a .nojekyll file to your docs dir."

Here's how:
git checkout gh-pages
mkdir docs/
touch docs/.nojekyll
git push origin gh-pages

And a redeploy:
npm run deploy