In this short video, we will use the awesome GitHub Pages feature to deploy our React.js app for free. You can even add a custom domain later! This technique would also work for other static websites too. Hope you enjoy the video and find it useful!
----------------------------------------------------------
⌨️ Commands Used
----------------------------------------------------------
Step 1
▶️ git remote add origin [YOUR REPO LINK]
▶️ git add -A
▶️ git commit -m "Initial commit"
▶️ git push -u origin main
Step 2
"homepage": "[ Ссылка ] REPO NAME]",
Step 3
▶️ npm install gh-pages --save-dev
Step 4
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
▶️ npm run deploy
----------------------------------------------------------
⏰ Timestamps
----------------------------------------------------------
0:00 Introduction
0:25 Step 1 (Get your React app on GitHub)
2:11 Step 2 (Add final URL to package.json)
3:33 Step 3 (Add gh-pages npm package)
4:06 Step 4 (Create deploy scripts and deploy!)
----------------------------------------------------------
📚 Resources
----------------------------------------------------------
Editor (Visual Studio Code): [ Ссылка ]
Web Browser (Firefox Developer Edition): [ Ссылка ]
Terminal (iTerm, Mac only): [ Ссылка ]
MDN (where I reference JavaScript documentation): [ Ссылка ]
----------------------------------------------------------
🔗 My Links
----------------------------------------------------------
GitHub: [ Ссылка ]
Instagram: [ Ссылка ]
LinkedIn: [ Ссылка ]
Personal site: [ Ссылка ]
#jamesgrimshaw #react
![](https://i.ytimg.com/vi/2hM5viLMJpA/maxresdefault.jpg)