#!/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!"