Skip to content

chore(action): 测试自动更新 #11

chore(action): 测试自动更新

chore(action): 测试自动更新 #11

Workflow file for this run

name: Update Arona Doc
on:
push:
branches:
- master
paths:
- "arona-doc/**"
workflow_dispatch:
concurrency:
group: "deploy0doc"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@main
with:
fetch-depth: 0
# Set up Node.js environment
- uses: actions/setup-node@main
with:
node-version: '18.x'
- uses: pnpm/action-setup@master
with:
version: latest
- name: Build
run: |
cd arona-doc
pnpm i
pnpm run build
- name: Compress dist directory
uses: thedoctor0/zip-release@main
with:
directory: 'arona-doc/docs/.vitepress'
type: '7z'
filename: 'dist.7z'
path: 'dist'
exclusions: '*.git* /*node_modules/* .editorconfig'
- name: Docs rsync deploy
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.SERVER_KEY }}
SOURCE: "dist.7z"
REMOTE_HOST: ${{ secrets.SERVER_HOST }}
REMOTE_USER: ${{ secrets.SERVER_USERNAME }}
TARGET: "/srv/arona-doc/tmp/dist.7z"
- name: Run script on server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_KEY }}
script: |
cd /srv/arona-doc
bash run2.sh