아래와 같이 gh-pages 설치
npm i gh-pages
package.js 파일에
"homepage": "http://{your github id}.github.io/{your project name}"
을 입력하고
"scripts" 항목아래
"deploy": "gh-pages -d build",
"predeploy": "npm run build"
를 입력한다.
npm run deploy
를 실행하면 predeploy 실행 후 deploy를 실행한다.
실행 완료 후 homepage url 로 방문하면 deploy 성공~
자세한 내용은
https://youtu.be/HdFbiPkZXR0
해당 script 를 실행시 "Permission Denied (publickey)" 발생시 아래를 참고해서 해결했다.
gist.github.com/adamjohnson/5682757
Fix "Permission denied (publickey)" error when pushing with Git
Fix "Permission denied (publickey)" error when pushing with Git - publickey-git-error.markdown
gist.github.com
'Programming > dev-frontend' 카테고리의 다른 글
npm (0) | 2020.11.27 |
---|---|
slick slider styling (0) | 2020.11.05 |
js cookie (0) | 2019.08.21 |
axios catch error (0) | 2019.08.21 |
video autoplay (0) | 2019.07.30 |