Skip to content

beautify pages

beautify pages #6

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: Node.js CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run docs:build --if-present
- run: ls ./docs/.vuepress/dist/
# 部署到阿里云
- name: Deploy to Aliyun
uses: easingthemes/ssh-deploy@main
env:
# 私钥
SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
# scp参数
ARGS: "-avzr --delete"
# 源目录,编译后生成的文件目录
SOURCE: "./docs/.vuepress/dist/"
# 服务器ip:换成你的服务器IP
REMOTE_HOST: ${{ secrets.REMOTE_IP }}
# 用户
REMOTE_USER: "root"
# 目标地址 你在服务器上部署代码的地方
TARGET: ${{ secrets.REMOTE_PATH }}