-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (45 loc) · 1.23 KB
/
Copy pathdeploy.yml
File metadata and controls
53 lines (45 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Deploy
on:
push:
branches: [main] # Dev
workflow_dispatch:
jobs:
# 构建工作
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout Docs
uses: actions/checkout@v4
with:
repository: MaaXYZ/MaaFramework
path: ./raw
sparse-checkout: |
docs
- name: Prepare Docs
run: |
cd src
cp -r ../raw/docs/zh_cn/* docs
cp -r ../raw/docs/en_us/* en/docs
mkdir -p public/docs
rm -rf public/docs/static
cp -r ../raw/docs/static public/docs
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
- name: Install dependencies
run: yarn install
- name: Build with VitePress
run: yarn build
- name: Deploy to Server
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }}
REMOTE_HOST: ${{ secrets.DEPLOY_HOST }}
REMOTE_USER: ${{ secrets.DEPLOY_USERNAME }}
TARGET: ${{ secrets.DEPLOY_PATH }}
SOURCE: src/.vitepress/dist
# ARGS: -avzr --delete