Skip to content

Commit

Permalink
👷 切换 github pages 使用 2.x 文档
Browse files Browse the repository at this point in the history
  • Loading branch information
Hccake committed Mar 31, 2024
1 parent fe95623 commit 5308675
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ name: github pages
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
branches: [ "2.x" ]
# 手动触发事件
workflow_dispatch:

Expand All @@ -17,19 +15,19 @@ jobs:
steps: # 执行步骤

# checkout 分支
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install npm dependencies
run: npm install
node-version: 18
cache: 'pnpm'
- name: Install pnpm dependencies
run: pnpm install
- name: Doc build
run: npm run docs:build
- run: cp -rf docs/.vuepress/doc/* .
run: pnpm run docs:build
- run: cp -rf docs/.vitepress/dist/* .

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: gh-pages
clean: false
Expand Down

0 comments on commit 5308675

Please sign in to comment.