-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ services: | |
networks: | ||
- app-tier | ||
|
||
# cd 테스트 | ||
# phpmyadmin: | ||
# image: phpmyadmin | ||
# restart: always | ||
|