Skip to content

Commit

Permalink
env: cd 파이프라인 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
SRASONY committed Dec 23, 2024
1 parent ed7690d commit 601301c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CD Pipeline

on:
push:
branches:
- deploy
pull_request:
branches:
- deploy

jobs: # Job
cd: # Job 이름

runs-on: ubuntu-latest # Runner

steps: # Step

# ssh를 통해 EC2에 접속, 접속한 후에 실행할 스크립트 작성
- name: Connect to EC2 using SSH
uses: appleboy/ssh-action@master
with:
host: ${{secrets.AWS_HOST}}
username: ${{secrets.AWS_USERNAME}}
key: ${{ secrets.AWS_KEY_PEM }}
envs: GITHUB_SHA
script: |
cd Backend
git pull
sudo docker-compose down
sudo docker-compose up -d --build
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ services:
networks:
- app-tier

# cd 테스트
# phpmyadmin:
# image: phpmyadmin
# restart: always
Expand Down

0 comments on commit 601301c

Please sign in to comment.