Deploy to Github

Now goto your Github and create new repository with App name, in our case, react-face-recognition then copy git URL to add in our project later. Next, open package.json and add "homepage" with your Github account and App name like this.

"homepage": ""

Don’t close package.json file just yet, because we will add predeploy and deploy command lines under "scripts" like this.

"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy": "gh-pages -d build"

Now you can save the file and go back to your console terminal, then run git commands to upload code to your Github repository and runnpm run deploy to deploy to Github Pages. The page should be published with URL that you set as

git add .
git commit -m "make something good"

// First Time
git remote add origin

// Update Timegit remote add upstream
git push -u origin master

npm run deploy

You can check Github Page of this tutorial here, and also complete repo.

I hope you enjoy my tutorial and try making your react facial recognition of your own. If you find this tutorial is quite simple and want to see more complete version, please visit my demo page here, and also the repo.

Post a Comment