Adarsh Kumar
Adarsh Kumar

Reputation: 115

Hosting React project on Github pages while developing

Is there a way to host the master branch of my React project on Github pages, while continuing to work in some other branch (say, development)?

P.S: I am a newbie to hosting React on Github. I will be very thankful if you could provide an in-depth explanation, or guide me to some resource that is detailed. Thanks a lot!

Upvotes: 1

Views: 44

Answers (1)

AKX
AKX

Reputation: 168967

By default, only the gh-pages branch of your repo will be published, and it can be an entirely separate branch from your other development.

At a quick glance, https://dev.to/yuribenjamin/how-to-deploy-react-app-in-github-pages-2a1f looks like a good tutorial for deploying React apps with Create React App. The Create React App docs also have a section on deployment. https://create-react-app.dev/docs/deployment

Upvotes: 1

Related Questions