Skip to content

Commit

Permalink
[STMT-6] ๐Ÿ’š CI/CD dev ํ…Œ์ŠคํŠธ์šฉ ์ฝ”๋“œ ์ถ”๊ฐ€
Browse files Browse the repository at this point in the history
- event trigger์™€ deploy prod์˜ if ๋ถ€๋ถ„ ์ฝ”๋“œ์— dev ์ถ”๊ฐ€
  • Loading branch information
05AM authored Feb 17, 2024
1 parent d40265f commit e400196
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: CI/CD using github actions & docker
# event trigger
on:
push:
branches: [ "main" ]
branches: [ "dev", "main" ]

permissions:
contents: read
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Deploy to prod
uses: appleboy/ssh-action@master
id: deploy-prod
if: contains(github.ref, 'main')
if: contains(github.ref, 'main') || contains(github.ref, 'dev')
with:
host: ${{ secrets.AWS_PUBLIC_IP }}
username: ${{ secrets.AWS_USER }}
Expand All @@ -71,5 +71,5 @@ jobs:
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/server
sudo docker stop stumeet-server
docker container prune -f
sudo docker-compose up -d --no-deps --force-recreate stumeet-server
sudo docker compose up -d --no-deps --force-recreate stumeet-server
sudo docker image prune -f

0 comments on commit e400196

Please sign in to comment.