-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (29 loc) · 1.06 KB
/
whatsapp-deploy.yml
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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Deploy WA JS
on:
push:
branches: ["main"]
paths:
- "whatsapp-js/**"
workflow_dispatch:
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Deploy using ssh
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.WA_SERVER }}
username: ${{ secrets.WA_SERVER_USERNAME }}
key: ${{ secrets.WA_SERVER_PRIVATE_KEY }}
port: 22
script: |
cd ~/flickmatch/home/whatsapp-js
git stash
git pull origin main
git status
~/.nvm/versions/node/v18.15.0/bin/pm2 restart main