Skip to content

Merge pull request #133 from TeamOwori/chore/#127/divide-server #87

Merge pull request #133 from TeamOwori/chore/#127/divide-server

Merge pull request #133 from TeamOwori/chore/#127/divide-server #87

Workflow file for this run

name: Owori Backend CD
on:
push:
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_PROD }}
username: ubuntu
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