Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How to deploy react app to github

In package.json add the following in this order:
	"homepage": "https://{your-github-name}.github.io/{name-of-your-repo}"

in the Scripts section, add:
	"predeploy": "npm run build",
    "deploy": "gh-pages -d build",
    
Save and commit Changes.
Push your changes to github.

Finally, in the terminal run:
	npm run build
    
 Your react app will be successfully deployed to github pages
Source by create-react-app.dev #
 
PREVIOUS NEXT
Tagged: #How #deploy #react #app #github
ADD COMMENT
Topic
Name
4+4 =