github에서 리파지토리 생성
react 설치
npx react-create-app .
npm i gh-pages
...
"homepage": "https://poburi.github.io/movie/",
...
"scripts":
...
"deploy": "gh-pages -d build"
깃 푸시하고 마스터브랜치 확인.
npm run build
실행 build
라는 폴더가 생겼다.
index.html
과 모든 static asset 관련 파일들이 들어있다.
npm run deplay
실행💡 합쳐도됨 npm run build && npm run deploy
이제 gh-pages 브랜치가 생겼는지 확인.
Settings
메뉴에서 GitHub Pages로 쭉 내리면
사이트가 배포되었다는 문구와 함께 링크가 생겼다. 클릭해보면:
정상적으로 배포된 것을 확인할 수 있다.