---
# System prepended metadata

title: React App deploy on github-pages
tags: [App Hosting]

---

---
title: React App deploy on github-pages
tags: App Hosting
--- 

# React App deploy on github-pages


https://create-react-app.dev/docs/deployment/#github-pages

(should be public repository!!)

1. `npm i -save gh-pages`


2. Add in (package.json)

        {
          "homepage": "https://barrystone.github.io/repos-name",

          "scripts": {

            "predeploy": "npm run build",
            "deploy": "gh-pages -d build"

          }  
        }

3. `npm run deploy`

4. Go to repos setting, set Source to (gh-pages-branch) in github pages.


---

Reference Turtorial:

- The Complete Junior to Senior Web Developer Roadmap (2020)/
    4. React + Redux + Module Bundling/
    26. CWD Deploying Our React App
