Skip to content

Commit b2cd8ed

Browse files
authored
Create deploy.yml
1 parent b4f1683 commit b2cd8ed

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

.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: [ main ]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Deploy via SSH
13+
uses: appleboy/ssh-action@v1.0.0
14+
with:
15+
host: ${{ secrets.EC2_HOST }}
16+
username: ${{ secrets.EC2_USERNAME }}
17+
key: ${{ secrets.EC2_SSH_KEY }}
18+
script: |
19+
cd /home/ubuntu/skribble-app
20+
git pull origin main
21+
docker-compose down
22+
docker-compose up -d --build

0 commit comments

Comments
 (0)