Skip to content

Fix

Fix #3

Workflow file for this run

name: Node CI
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run docs:build
- name: Deploy to Baota Server
uses: easingthemes/ssh-deploy@v4.1.8 # 使用ssh-deploy Action
with:
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
REMOTE_HOST: ${{ secrets.SERVER_HOST }}
REMOTE_USER: ${{ secrets.SERVER_USER }}
REMOTE_PORT: ${{ secrets.SERVER_PORT }}
SOURCE: 'dist/'
TARGET: ${{ secrets.SERVER_TARGET }}
ARGS: '-rltgoDzv'
EXCLUDE: 'node_modules/'
SCRIPT_BEFORE: |
mkdir -P ${{ secrets.SERVER_TARGET }}
rm -rf ${{ secrets.SERVER_TARGET }}/*
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true