쉘 추가
This commit is contained in:
parent
b9056611c4
commit
bbb620ff63
23
deploy.sh
Normal file
23
deploy.sh
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# PM2에서 'front' 애플리케이션 중지
|
||||
echo "Stopping PM2 application 'front'..."
|
||||
pm2 stop front
|
||||
|
||||
# Git에서 최신 코드 가져오기
|
||||
echo "Pulling latest code from git..."
|
||||
git pull
|
||||
|
||||
# NPM 빌드 실행
|
||||
echo "Building application..."
|
||||
npm run build
|
||||
|
||||
# PM2에서 'front' 애플리케이션 삭제
|
||||
echo "Deleting old PM2 application 'front'..."
|
||||
pm2 del front
|
||||
|
||||
# PM2로 애플리케이션 재시작
|
||||
echo "Starting PM2 application 'front'..."
|
||||
pm2 start npm --name "front" -- start
|
||||
|
||||
echo "Deployment completed!"
|
Loading…
Reference in New Issue
Block a user