Skip to content
This repository was archived by the owner on Jul 17, 2026. It is now read-only.

Commit d0af491

Browse files
committed
✨ feat: 添加 WebSocket API 文档
1 parent 54070bb commit d0af491

13 files changed

Lines changed: 2193 additions & 28 deletions

File tree

.github/workflows/docs.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# 构建 VitePress 站点并将其部署到 GitHub Pages 的示例工作流程
2+
#
3+
name: Deploy VitePress site to Pages
4+
5+
on:
6+
push:
7+
branches: [dev]
8+
paths:
9+
- "docs/**"
10+
- "package.json"
11+
- "pnpm-lock.yaml"
12+
workflow_dispatch:
13+
14+
# 设置 GITHUB_TOKEN 的权限,以允许部署到 GitHub Pages
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
# 只允许同时进行一次部署,跳过正在运行和最新队列之间的运行队列
21+
# 但是,不要取消正在进行的运行,因为我们希望允许这些生产部署完成
22+
concurrency:
23+
group: pages
24+
cancel-in-progress: false
25+
26+
jobs:
27+
# 构建工作
28+
build:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v5
33+
with:
34+
fetch-depth: 0
35+
- uses: pnpm/action-setup@v4
36+
with:
37+
version: 10
38+
- name: Setup Node
39+
uses: actions/setup-node@v6
40+
with:
41+
node-version: 24
42+
cache: pnpm
43+
- name: Setup Pages
44+
uses: actions/configure-pages@v4
45+
- name: Install dependencies
46+
run: pnpm install
47+
- name: Build with VitePress
48+
run: pnpm run docs:build
49+
- name: Upload artifact
50+
uses: actions/upload-pages-artifact@v3
51+
with:
52+
path: docs/.vitepress/dist
53+
54+
# 部署工作
55+
deploy:
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
needs: build
60+
runs-on: ubuntu-latest
61+
name: Deploy
62+
steps:
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@ out
2828
*.sw?
2929
.env.development
3030
.env.production
31+
32+
# Docs
33+
docs/.vitepress/cache
34+
docs/.vitepress/dist

0 commit comments

Comments
 (0)