-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 1007 Bytes
/
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
name: Deploy Api
on:
push:
branches: [ master ]
jobs:
build-deploy:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: --max_old_space_size=1536
DATABASE_URL: ${{ secrets.DATABASE_URL }}
EXTERNAL_API_KEY: ${{ secrets.EXTERNAL_API_KEY }}
OAUTH_GOOGLE_CLIENT_ID: ${{ secrets.OAUTH_GOOGLE_CLIENT_ID }}
OAUTH_GOOGLE_CLIENT_SECRET: ${{ secrets.OAUTH_GOOGLE_CLIENT_SECRET }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
PUBLIC_KEY: ${{ secrets.PUBLIC_KEY }}
steps:
- name: SSH and deploy node app
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: 22
script: |
cd /var/www/html/fantasy-api.simoen.tech
rm yarn.lock package-lock.json
git pull origin master
yarn install
yarn build
pm2 restart edd-API --update-env