Skip to content

Commit 7ffb16b

Browse files
committed
feat: deploy aws ec2 staging
1 parent 83e355e commit 7ffb16b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI/CD STAGING
2+
3+
on:
4+
workflow_dispatch:
5+
6+
push:
7+
branches: [ development ]
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: 🚀 Deploy in EC2
15+
uses: appleboy/ssh-action@master
16+
with:
17+
host: ${{ secrets.AWS_EC2_HOSTNAME }}
18+
username: ${{ secrets.AWS_EC2_USERNAME }}
19+
key: ${{ secrets.AWS_EC2_PRIVATE_KEY }}
20+
port: 22
21+
script: |
22+
DOCKER_BUILDKIT=1
23+
cd /home/ubuntu/repository
24+
git checkout develop -f
25+
git fetch
26+
git pull
27+
docker build -t spring-crud-api:development .
28+
cd /home/ubuntu
29+
docker-compose up -d --build

0 commit comments

Comments
 (0)