Skip to content

Commit b6d8295

Browse files
add ci/cd
1 parent f1b6982 commit b6d8295

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Deploy to VPS
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
16+
- name: Deploy via SSH
17+
uses: appleboy/ssh-action@v1.0.0
18+
with:
19+
host: 91.229.245.38
20+
username: root
21+
key: ${{ secrets.VPS_SSH_KEY }}
22+
script: |
23+
cd /projects/hamar/api
24+
git pull
25+
npm install
26+
npm run build
27+
pm2 restart hamar-api

0 commit comments

Comments
 (0)