Design comparison
Solution retrospective
i need help on how to host react apps on github pages someone help me please😢
Community feedback
- @Avitohol1Posted about 2 years ago
Hi there - I saw from your package.json that you have installed gh-pages. Did you run npm run deploy and if so are there any errors that show up? Anyways this is my process on publishing to gh-pages:
- Install gh-pages (npm install gh-pages --save-dev)
- Create github repository
- git add .
- git commit -m 'first commit'
- git branch -M main
- git remote add origin https://github.com/{your_username}/{your_repo}.git
- git push -u origin master
- npm run deploy
Also, make sure you have the correct homepage in package.json Hope this helps!
Marked as helpful0 - @iamenochleePosted about 2 years ago
Not familiar with using github pages for react deployment, but , You can use vercel, just connect you git account and you are good to go. Well ofcourse make sure you build the project. If i couldn't convince you, well here is an article on your question Github Pages. I believe you will have to add github pages as a package dependency
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord