Using Visual Studio Code.....
Step 1. First, add your repository using source control (Ctrl+Shift+G) on GitHub.
Step 2. Open terminal
Step 3.
git install gh-pages
Step 4.
In package.json add following in first block before "name" :
"homepage": "https://<githubId>.github.io/<repoName>",
Step 5. In package.json, inside "scripts" block, add the following after "start":
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
Step 6. Save the file and open terminal
Step 7.git add .
Step 8. git commit -m "deploying webpage"
Step 9. git push
Step 10. npm run deploy
Top comments (0)