Skip to content

Commit

Permalink
docs: update github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Dec 11, 2024
1 parent e86a953 commit b83c9c0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
12 changes: 5 additions & 7 deletions docs/guide/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,19 @@ jobs:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
# choose pnpm version to use
version: 8
# install deps with pnpm
run_install: true
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
# choose node.js version to use
node-version: 20
node-version: 22
# cache deps for pnpm
cache: pnpm

- name: Install deps
run: pnpm install --frozen-lockfile

# run build script
- name: Build VuePress site
run: pnpm docs:build
Expand Down
20 changes: 9 additions & 11 deletions docs/zh/guide/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,27 @@ jobs:
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
# 选择要使用的 pnpm 版本
version: 8
# 使用 pnpm 安装依赖
run_install: true
- name: 设置 pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
- name: 设置 Node.js
uses: actions/setup-node@v4
with:
# 选择要使用的 node 版本
node-version: 20
node-version: 22
# 缓存 pnpm 依赖
cache: pnpm

- name: 安装依赖
run: pnpm install --frozen-lockfile

# 运行构建脚本
- name: Build VuePress site
- name: 构建 VuePress 站点
run: pnpm docs:build

# 查看 workflow 的文档来获取更多信息
# @see https://github.com/crazy-max/ghaction-github-pages
- name: Deploy to GitHub Pages
- name: 部署到 GitHub Pages
uses: crazy-max/ghaction-github-pages@v4
with:
# 部署到 gh-pages 分支
Expand Down

0 comments on commit b83c9c0

Please sign in to comment.