Skip to content

Commit f6e1259

Browse files
authored
Create ec2.yml
1 parent 2153ebb commit f6e1259

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/ec2.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Deploy Frontend
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Deploy to EC2
13+
uses: appleboy/[email protected]
14+
with:
15+
host: ${{ secrets.REMOTE_IP }}
16+
username: ${{ secrets.REMOTE_USER }}
17+
key: ${{ secrets.REMOTE_PRIVATE_KEY }}
18+
port: ${{ secrets.REMOTE_SSH_PORT }}
19+
script: |
20+
cd /home/ubuntu/client # 프로젝트 디렉토리
21+
git pull origin main
22+
cd client
23+
npm install
24+
npm run build

0 commit comments

Comments
 (0)