Skip to content

Commit 40bfb41

Browse files
committed
feat :Github actions 자동 배포 기능 구현
1 parent 6061173 commit 40bfb41

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: CD
2+
3+
on:
4+
push:
5+
branches: [ "main", "dev" ]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Deploy to EC2
13+
uses: appleboy/ssh-action@master
14+
with:
15+
host: ${{ secrets.EC2_HOST }}
16+
username: ubuntu
17+
key: ${{ secrets.EC2_SSH_KEY }}
18+
script: |
19+
cd /home/ubuntu/backend
20+
../deploy-backend.sh

0 commit comments

Comments
 (0)