Skip to content

feat: 修改actions

feat: 修改actions #3

Workflow file for this run

# 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: 发布到云服务器
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 }}
key: ${{ 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 && npm run start:pm2