Skip to content

build: 🧱 dev-db 분리에 따른 설정 추가 #23

build: 🧱 dev-db 분리에 따른 설정 추가

build: 🧱 dev-db 분리에 따른 설정 추가 #23

Workflow file for this run

name: Deploy Dev
on:
push:
branches:
- dev
jobs:
deploy:
name: Deploy Dev
runs-on: ubuntu-22.04
steps:
- name: Deploy to Dev EC2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.EC2_DEV_HOST }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_SSH_KEY }}
script: |
cd $HOME/42Stat-Backend ;
docker-compose -f docker-compose.dev.yml down -v ;
cd $HOME &&
echo "clone repository" &&
sudo rm -rf ./42Stat-Backend &&
git clone https://github.com/42Statistics/42Stat-Backend.git &&
cd 42Stat-Backend &&
git switch dev &&
git submodule init &&
git submodule update &&
echo "run docker" &&
docker-compose -f docker-compose.dev.yml up -d