Skip to content

Commit

Permalink
feat: docs workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
vastsa committed Feb 12, 2025
1 parent 93b005b commit 2d3dcad
Show file tree
Hide file tree
Showing 2 changed files with 221 additions and 200 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
# 在针对 `main` 分支的推送上运行。如果你
# 使用 `master` 分支作为默认分支,请将其更改为 `master`
push:
branches: [master]
branches: [ master ]

# 允许你从 Actions 选项卡手动运行此工作流程
workflow_dispatch:
Expand All @@ -32,21 +32,24 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # 如果未启用 lastUpdated,则不需要
# - uses: pnpm/action-setup@v3 # 如果使用 pnpm,请取消此区域注释
# with:
# version: 9
- uses: pnpm/action-setup@v3
with:
version: 9
# - uses: oven-sh/setup-bun@v1 # 如果使用 Bun,请取消注释
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm # 或 pnpm / yarn
cache: 'pnpm'
cache-dependency-path: 'docs/pnpm-lock.yaml'
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: pnpm install # 或 pnpm install / yarn install / bun install
working-directory: docs
run: pnpm install
- name: Build with VitePress
run: pnpm run docs:build # 或 pnpm docs:build / yarn docs:build / bun run docs:build
working-directory: docs
run: pnpm run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
Loading

0 comments on commit 2d3dcad

Please sign in to comment.