Skip to content

Commit fd7aa33

Browse files
committed
add ci-cd pipeline
1 parent 2851ccd commit fd7aa33

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Deploy to EC2
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
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 ~/app/golang-bdcoe-portal
20+
git pull origin master
21+
docker-compose down
22+
docker-compose up -d --build

0 commit comments

Comments
 (0)