[npm] npm run dispatch 관련
2020-09-17
npm dispatch로 로컬 변경한 사항을 서버에 바로 적용하는 update를 해봤다
- 먼저 로컬프로젝트에서 변경한 사항들을 스테이징한 후 커밋한다.
- 그리고 pull/push를 한 다음에
-
npm run dispatch를 실행한다.
※ 그 전에 dispatch.sh (.env같은 설정파일)이 같은 프로젝트 폴더에 있어야한다. - dispatch.sh의 파일 생김새는 아래와 같다. ```javascript #!/bin/bash echo “dispatch production start” ssh ~/.ssh/(키파일 이름) 계정@아이피 포트번호 ‘expect -c’ …이하 생략
//그리고 그 다음 cd 폴더경로 username, password 설정 ```
-
그런 담에 the authenticity of host can’t be established 라는 경고가 뜨고,
are you sure you want to continue connecting (yes/no)? 가 뜸
이는 처음 dispatch를 했을 때 처음 보는 컴퓨터라서 물어보는 의미라고 한다 -
그 다음으로 뜨는 절차는
이렇게 뜨면ctrl+X -
save modified buffer? 일 경우 Yes.
-
그리고 file name to write 어쩌고 하면 Enter.