Im using react to publish to gh pages, and its giving me a 404 despite my other one ryan-howard-hc.github.io/ReactMenu working from the same tutorial video?
https://github.com/ryan-howard-hc/ryan-howard-hc.github.io
Here is the repo, It's giving me a 404 and Ive tried everything I can think of and have compared to my other repo ReactMenu
I followed the same method to deploy that. I thought it had something to do with the fact its the homepage ryan-howard-hc.github.io but I have no idea. Please help!
You have only uploaded the source code in your GitHub repository and it will not work.
If you want to deploy a react website to GitHub pages then follow this:
cd /change/this/to/your/project/root/directory/path/
npm run build
gh-pages
package to your projectnpm install gh-pages --save-dev
predeploy
and deploy
properties."scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
}
username
and repo-name
git remote add origin https://github.com/{username}/{repo-name}.git
npm run deploy
gh-pages
and root as /
And now if you have followed any of this 2 method your react app will be successfully deployed to the GitHub pages.