Skip to content

Commit

Permalink
Merge pull request #33 from mingoo36/master
Browse files Browse the repository at this point in the history
블루그린배포구현
  • Loading branch information
mingoo36 authored Jan 13, 2025
2 parents e185988 + ab8fab9 commit 7f5e163
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,18 @@ jobs:
username: ${{ secrets.EC2_USER }} # SSH 사용자명
key: ${{ secrets.EC2_SSH_KEY }} # SSH 개인 키
script: |
cd /home/ubuntu/community/5-covy-lee-community-be # 프로젝트 폴더 경로로 이동
git checkout master # master 브랜치 확인
git pull origin master # 최신 코드 가져오기
echo "Pulling latest code into Blue environment..."
cd /home/ubuntu/community/blue/5-covy-lee-community-be
git checkout master
git pull origin master
echo "Pulling latest code into Green environment..."
cd /home/ubuntu/community/green/5-covy-lee-community-be
git checkout master
git pull origin master
echo "Restarting servers..."
cd /home/ubuntu
./server-restart.sh # 서버 재실행
./server-start.sh blue
echo "Git pull completed successfully!"

0 comments on commit 7f5e163

Please sign in to comment.