How to deploy a create-react-app to a web host (ex. Siteground)?

Dane W. Iliff picture Dane W. Iliff · Jan 24, 2018 · Viewed 15.2k times · Source

I'm building a react project using create-react-app and am trying to figure out how to deploy my code to my hosting server on Siteground.

Does anyone know the best way to do this? Do I import my build folder through FTP? Can I automate the process through GitHub?

Thanks in advance!

Answer

arthurakay picture arthurakay · Jan 24, 2018

Per the create-react-app docs, you run npm run build and basically just take the output and FTP it to your web server.

However your question is very broad -- you could automate through GitHub or some other tool, but that's really going to beg opinionated responses on StackOverflow (which isn't the right forum for those kinds of questions).