Skip to content

Update node.js.yml

Update node.js.yml #6

Workflow file for this run

name: 发布到云服务器
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands to develop
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
password: ${{ secrets.DEPLOY_SECRET }}
script: |
cd ${{ secrets.DEPLOY_DIR }}
rm -rf blog
git clone git@github.com:chenchunyang123/ccy-blog-client.git
mv ccy-blog-client blog
cd blog
npm install
npm run build
pm2 delete blog || true
npm run start:pm2