gh-pages를 이용한 github.io에 게시하기

ng-pages

설치

1
$ npm i gh-pages

package.json 설정

“homepage”추가

http://<github ID>.github.io/<Repository Name>

1
2
3
4
"name": "coin_explorer",
"version": "0.1.0",
...
"homepage": "https://hicucu.github.io/ReactjsStudy-CoinExplorer/"

script에 deploy, predeploy 추가

1
2
3
4
5
6
7
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
...
"deploy" : "gh-pages -d build",
"predeploy" : "npm run build"
},
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×