Skip to content

update

update #97

Workflow file for this run

name: prod
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: "16.5.0"
- name: copy file via ssh key
uses: appleboy/scp-action@master
with:
source: "./*"
host: ${{ secrets.HOST }}
target: "/usr/src/zhoubichuan/prod/antdpro-express"
port: ${{ secrets.PORT }}
username: ${{ secrets.USER }}
password: ${{ secrets.PASSWORD }}
- name: Executing remote ssh commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
password: ${{ secrets.PASSWORD }}
script: |
cd /usr/src/zhoubichuan/prod/antdpro-express
export NODE_HOME=/usr/bin/node
export PATH=$PATH:$NODE_HOME/bin
npm install
pm2 delete antdpro-express
pm2 start app.js --name antdpro-express