1. github에서 레포지토리 생성
2. 터미널(Ctrl+J)에 npm install gh-pages --save-dev 입력
3. package.json > name과 version 아래 배포할 주소 추가
"homepage" : "https://{username}.github.io/{repo name}",
예) "homepage" : "https://subin9804.github.io/example-repo",
scripts에서 제일 위에 추가 (배포 전후로 호출할 명령문)
"predeploy" : "npm run build",
"deploy" : "gh-pages -d build",
4. 터미널에 git init (프로젝트 폴더를 깃 레포지토리로 만듦)
5. git add *
6. git commit -m "first commit"
7. git branch -M main (main을 메인 브렌치로 지정, 생략가능)
8. git remote add origin https://github.com/subin9804/example-repo (저장할 repository 지정)
9. npm run deploy
'etc' 카테고리의 다른 글
[KOSTA 프로젝트] 03. 사이드바에서 현재 페이지 표시하기 (0) | 2023.12.13 |
---|---|
[KOSTA 프로젝트] 02. JPA와 ArrayIndexOutOfBoundsException (4) | 2023.12.01 |
[KOSTA 프로젝트] 01. DB에 JSON형태로 저장해도 될까? (1) | 2023.11.14 |
[DB]MYSQL 문법 정리 (0) | 2023.07.14 |
간단한 git 사용법 (2) | 2023.02.03 |
댓글