nuxt.config.js 파일의 head 아래에 코드 추가
target: 'static', // 정적 웹사이트임을 명시
router: {
base: '/NuxtJS-Guide/' // github repository 이름 넣기
},
npm install push-dir --save-dev
"scripts": {
"deploy": "push-dir --dir=dist --branch=gh-pages --cleanup"
},
npm run generate

dist 폴더 하위에 있는 파일들이 실제 배포될 파일
npm run deploy

만들었던 깃허브 레파지토리 셋팅 창에서 pages 들어가서 Build and deployment 의 branch 값을 gh-pages 로 변경

완료 ! 😚😋😊