-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (38 loc) · 1.1 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Deploy to Production
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
container:
image: node:lts-alpine
steps:
- name: Install SSH Client and Dependencies
run: apk add --no-cache openssh
- name: Install PNPM
run: npm install -g pnpm
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
- name: Install dependencies
run: pnpm install
- name: Build the application
run: pnpm run build
- name: Add SSH Key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.VEGETA_SERVER }}
- name: Deploy via SSH
env:
VEGETA_SERVER_IP: ${{ secrets.VEGETA_SERVER_IP }}
run: |
ssh -o StrictHostKeyChecking=no vegeta@${{ secrets.VEGETA_SERVER_IP }} << 'EOF'
cd ~/vanity2/vanity-split-key-merging
git pull origin main
pnpm install
pnpm run build
pm2 reload vslitkey-merging --update-env
EOF