Skip to content

Commit

Permalink
Update cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ssojungg authored Jan 26, 2024
1 parent 60606ac commit 77e86b6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,18 @@ jobs:
env:
RABBITMQ_USER: ${{ secrets.RABBITMQ_USER }}
RABBITMQ_PASSWORD: ${{ secrets.RABBITMQ_PASSWORD }}

- name: Execute remote ssh commands to deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.AWS_HOST }}
username: ${{ secrets.AWS_USERNAME }}
key: ${{ secrets.SSH_KEY }}
script: |
cd /home/ubuntu/project
git stash
git pull origin main
docker-compose -f docker-compose.prod.yml pull
docker-compose -f docker-compose.prod.yml down
# 환경 변수 적용을 위한 추가 명령어 필요
docker-compose -f docker-compose.prod.yml up -d

0 comments on commit 77e86b6

Please sign in to comment.