Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlo713 committed May 29, 2024
1 parent 19ab556 commit 38cde93
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
# 如果你文档需要 Git 子模块,取消注释下一行
Expand All @@ -27,9 +27,9 @@ jobs:


- name: 设置 Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: pnpm


Expand All @@ -38,9 +38,20 @@ jobs:
NODE_OPTIONS: --max_old_space_size=8192
run: pnpm run docs:build

- name: 部署文档
uses: JamesIves/github-pages-deploy-action@v4
# - name: 部署文档
# uses: JamesIves/github-pages-deploy-action@v4
# with:
# # 这是文档部署到的分支名称
# branch: gh-pages
# folder: src/.vuepress/dist

- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v4
with:
# 这是文档部署到的分支名称
branch: gh-pages
folder: src/.vuepress/dist
# deploy to gh-pages branch
target_branch: gh-pages
# deploy the default output dir of VuePress
build_dir: docs/.vuepress/dist
env:
# @see https://docs.github.com/en/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 38cde93

Please sign in to comment.