/github-page

Primary LanguageJavaScript

github-page

https://<username>.github.io 에 리액트 앱 올리기

  1. git repository 등록하기
git remote add origin https://<github repository url>.git
  1. gh-pages 설치
npm install --save gh-pages
  1. package.json 에 내용 추가
{
  "homepage": "https://<username>.github.io",  /*upload to user page*/
  "homepage": "https://<username>.github.io/app-name", /*upload to specific app path*/
  "homepage": "https://mywebsite.com", /*or upload to custom domain*/
  
  "scripts": {
    "predeploy": "npm run build",  /*this command will be automatically run before deploy command*/
    "deploy": "gh-pages -d build",
  }
}
  1. npm run deploy 커맨드 실행
  2. 등록한 repository 에서 gh-pages branch 를 Github Page Source 로 등록

gh-page-source