Skip to content

Commit

Permalink
feat: owori-cd.yml 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
junseokkim committed Jul 1, 2024
1 parent 144cd73 commit 9bbe918
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/owori-cd.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
name: Owori Backend CD
on:
push:
branches:
- "main"
branches: ["main", "develop"]

jobs:
server-deploy:
runs-on: ubuntu-latest
steps:
# Checkout the code (prod)
- name: executing remote ssh commands using password
if: github.ref == 'refs/heads/main'
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.AWS_IP }}
host: ${{ secrets.AWS_IP_PROD }}
username: ubuntu
key: ${{ secrets.SSH_PRIVATE_KEY }}
key: ${{ secrets.SSH_PRIVATE_KEY_PROD }}
script: |
cd ~/Owori-Server
git pull
sudo docker-compose -f docker-compose.prod.yml down
sudo docker-compose -f docker-compose.prod.yml up --build -d
# Checkout the code (dev)
- name: executing remote ssh commands using password
if: github.ref == 'refs/heads/develop'
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.AWS_IP_DEV }}
username: ubuntu
key: ${{ secrets.SSH_PRIVATE_KEY_DEV }}
script: |
cd ~/Owori-Server
git pull
sudo docker-compose -f docker-compose.yml down
sudo docker-compose -f docker-compose.yml up --build -d

0 comments on commit 9bbe918

Please sign in to comment.