Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Publish Docs
on:
push:
tags:
- '*'
- 'v*'
permissions:
contents: read
pages: write
Expand All @@ -17,6 +17,9 @@ concurrency:

jobs:
build-and-deploy:
if: |
(startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-'))
|| contains(github.event.head_commit.message, '[release doc]'))
runs-on: ubuntu-latest

environment:
Expand All @@ -28,24 +31,20 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

# 2️⃣ 安装 Node.js
- name: Setup Node
uses: actions/setup-node@v4
# 2️⃣ 安装 Bun.js
- uses: oven-sh/setup-bun@v2
with:
node-version: 20
cache: 'npm'

bun-version: 2.1.x
# 3️⃣ 安装依赖
- name: Install Dependencies
run: |
cd docs
npm install

bun install
# 4️⃣ 构建 VitePress
- name: Build VitePress
run: |
cd docs
npm run build
bun run build

# 5️⃣ 上传构建产物
- name: Upload Pages Artifact
Expand Down
Loading