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": "http://YOUR_GITHUB_ACCOUNT.github.io/react-face-recognition"

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 ashttp://YOUR_GITHUB_ACCOUNT.github.io/react-face-recognition

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

// First Time
git remote add origin https://github.com/YOUR_GITHUB_ACCOUNT/react-face-recognition.git

// Update Timegit remote add upstream https://github.com/hotidentity/skin-analysis.git
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

0 Comments