Skip to content

添加基础描述

添加基础描述 #59

Workflow file for this run

name: build and push to sever
on:
push:
branches:
- main
jobs:
deployment_job:
runs-on: ubuntu-latest
name: Deployment Job
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: npm install, build, and test
run: |
npm install -g yarn
yarn install
yarn run docs:build
ls -l
- name: ssh deploy
uses: easingthemes/ssh-deploy@v5.1.0
with:
# 本地.ssh文件下的私钥id_rsa,存在secrets的PRIVATE_KEY中
SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
# 复制操作的参数。"-avzr --delete"意味部署时清空服务器目标目录下的文件
ARGS: "-avzr --delete"
# 源目录,相对于$GITHUB_WORKSPACE根目录的路径
SOURCE: "/.vitepress/dist/"
# 服务器域名/IP
REMOTE_HOST: ${{ secrets.SEVER_HOST }}
# 服务器默认用户名为root
REMOTE_USER: "root"
# 目标目录
TARGET: '/opt/1panel/apps/openresty/openresty/www/sites/skyraah/index'
# 排除目录
EXCLUDE: "/node_modules/"