From 38cde93f96e2b32655cc4121e449206500312c3b Mon Sep 17 00:00:00 2001 From: ryanlo713 <12672523+ryanlo713@users.noreply.github.com> Date: Wed, 29 May 2024 14:09:01 +0800 Subject: [PATCH] upd --- .github/workflows/deploy-docs.yml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index ac355762..45980b56 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -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 子模块,取消注释下一行 @@ -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 @@ -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 }} \ No newline at end of file