How do I deploy a react website to github pages? - reactjs

I've tried following the github documentation and this video tutorial to a T https://www.youtube.com/watch?v=Dq6EkzoZp4w and yet when ever I try and visit my site I simply get a 404 error, this a link to the gh-page repo https://github.com/Jseto97/jseto.me/tree/gh-pages. Not sure what i'm doing wrong.

check this, it is very good tutorial to deploy react app on github pages https://medium.freecodecamp.org/surge-vs-github-pages-deploying-a-create-react-app-project-c0ecbf317089

Related

404 error and other errors when deploying github pages

I am trying to deploy my portfolio website built with react. I am using github pages to deploy the page.
This is the website I used when I got a 404 error in deploying. https://github.com/orgs/community/discussions/23058
This is the website I am trying to deploy: https://shivam242001.github.io/
On opening the site I initially see the 404 error in the console and when I click refresh I see this in the console
This is the git repo: https://github.com/Shivam242001/Shivam242001.github.io
I really need some help, I have been stuck on this for way too long. Thanks in advance
Because you set the wrong home page
"homepage": "https://github.com/Shivam242001/website.git"
It should be
"homepage": "https://shivam242001.github.io"
Please refer to this: https://github.com/gitname/react-gh-pages#4-add-a-homepage-property-to-the-packagejson-file

Publishing React website on GitHub pages produces a blank page

So I've managed to publish my React app to GitHub pages, but the page shows up blank. There are no known errors that I can tell as of now. Here is a link to the master branch: https://github.com/SarahACollins/Portfolio/tree/master and to the website https://sarahacollins.github.io/Portfolio/ . I am building the site from the gh-pages branch; I'm not sure if I'm supposed to but if I build the website from the master branch, I receive a 404 error where the page is just not found. Any help would be appreciated. Thanks.
GitHub Pages screenshot

Netlify Not Rendering React Component

Here is the link to my React project https://github.com/Count-T/blogfrontend, I ran npm run build and put that folder into netlify but when I check the app it only shows a blank page. I don't know is the problem is react-router but I already put a file to redirect netlify to index.html. This is my second time uploading a project onto netlify but my previous project did not use react-router-dom. Any help would be much appreciated thanks!
Link to netlify website: https://tonyliblog.netlify.app/
Here is an image of the website
I do see an error "Cannot convert undefined or null to object" in the console on the netlify site. I don't know if that could help you to pin down the issue. Did it run without any problem in your local env? Are you using any environment variables/ Keys to access your API?

Why isn't my React app deploying on GitHub

I'm trying to publish a react app I build on VS code, but it's not working. I followed this tutorial (https://github.com/gitname/react-gh-pages) but I can't access it at the address, I get 404. Here's my repo I'm trying use https://github.com/LazaroFilm/markdown-previewer
If you mean getting 404 on Github Pages, then be a little patient since it takes some time for github pages to show your demo
SOLVED. I needed to set the default branch in my GitHub repo settings.

When using Github pages and React how do you deploy to the homepage, i.e. https://username.github.io/?

All the examples I see online have you deploy to a subdomain (for example https://username.github.io/my-app). But how do you deploy to the homepage when using React? In my package.json file I have "homepage": "http://username.github.io/" and I'm using npm run deploy however my site doesn't show up, instead a React information file displays.
Any help would be greatly appreciated.
I figured out what I need to do after reading the 'Github Pages' section of this website: https://create-react-app.dev/docs/deployment/.

Resources