Skip to content

Commit c3ddf7e

Browse files
author
catlog22
committed
docs: add VitePress documentation site
- Add docs directory with VitePress configuration - Add GitHub Actions workflow for docs build and deploy - Support bilingual (English/Chinese) documentation - Include search, custom theme, and responsive design
1 parent ab65cae commit c3ddf7e

136 files changed

Lines changed: 34486 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Docs Build & Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
paths:
9+
- 'docs/**'
10+
pull_request:
11+
branches:
12+
- main
13+
- develop
14+
paths:
15+
- 'docs/**'
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
pages: write
21+
id-token: write
22+
23+
concurrency:
24+
group: "pages"
25+
cancel-in-progress: false
26+
27+
jobs:
28+
build:
29+
runs-on: ubuntu-latest
30+
defaults:
31+
run:
32+
working-directory: docs
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
37+
- name: Setup Node.js
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: '20'
41+
cache: 'npm'
42+
cache-dependency-path: docs/package-lock.json
43+
44+
- name: Install dependencies
45+
run: npm ci
46+
47+
- name: Build
48+
run: npm run docs:build
49+
50+
- name: Upload artifact
51+
uses: actions/upload-pages-artifact@v3
52+
with:
53+
path: docs/.vitepress/dist
54+
55+
deploy:
56+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
runs-on: ubuntu-latest
61+
needs: build
62+
steps:
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
uses: actions/deploy-pages@v4
66+
67+
# Lighthouse CI for PRs
68+
lighthouse:
69+
if: github.event_name == 'pull_request'
70+
runs-on: ubuntu-latest
71+
needs: build
72+
defaults:
73+
run:
74+
working-directory: docs
75+
steps:
76+
- name: Checkout
77+
uses: actions/checkout@v4
78+
79+
- name: Setup Node.js
80+
uses: actions/setup-node@v4
81+
with:
82+
node-version: '20'
83+
cache: 'npm'
84+
cache-dependency-path: docs/package-lock.json
85+
86+
- name: Install dependencies
87+
run: npm ci
88+
89+
- name: Build
90+
run: npm run docs:build
91+
92+
- name: Start preview server
93+
run: |
94+
npm run docs:preview -- --host 127.0.0.1 --port 4173 &
95+
npx --yes wait-on http://127.0.0.1:4173/
96+
97+
- name: Run Lighthouse CI
98+
uses: treosh/lighthouse-ci-action@v10
99+
with:
100+
urls: |
101+
http://127.0.0.1:4173/
102+
uploadArtifacts: true
103+
temporaryPublicStorage: true
104+
commentPR: true
105+
budgetPath: docs/lighthouse-budget.json

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,8 @@ ccw/.tmp-ccw-auth-home/
138138

139139
# Skills library (local only)
140140
.claude/skills_lib/
141+
142+
# Docs site
143+
docs/node_modules/
144+
docs/.vitepress/dist/
145+
docs/.vitepress/cache/

docs/.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Dependencies
2+
node_modules/
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
pnpm-debug.log*
7+
8+
# Build outputs
9+
.vitepress/dist/
10+
.vitepress/cache/
11+
docs/.vitepress/dist/
12+
docs/.vitepress/cache/
13+
dist/
14+
public/search-index.*.json
15+
16+
# Editor directories and files
17+
.vscode/
18+
.idea/
19+
*.suo
20+
*.ntvs*
21+
*.njsproj
22+
*.sln
23+
*.sw?
24+
.DS_Store
25+
26+
# Temporary files
27+
*.tmp
28+
*.temp
29+
.cache/
30+
31+
# Logs
32+
logs/
33+
*.log
34+
35+
# Environment
36+
.env
37+
.env.local
38+
.env.*.local
39+
40+
# OS
41+
.DS_Store
42+
Thumbs.db
43+
.ace-tool/

0 commit comments

Comments
 (0)