간단하게 리액트로 만든 토이프로젝트를 GitHub Page에 배포하는 방법에 대해서 정리한다.
CRA (Create React App)로 만든 프로젝트를 배포한다.
npm install gh-pages
"homepage": "git page 주소", // 추가
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"deploy": "gh-pages -d build" // 추가
},
npm run build
npm run deploy
git add .
git commit -m "배포"
git push