diff --git a/.github/workflows/docs-format-check.yml b/.github/workflows/docs-format-check.yml index 08cc79eabcb..7ff95084169 100644 --- a/.github/workflows/docs-format-check.yml +++ b/.github/workflows/docs-format-check.yml @@ -21,27 +21,21 @@ jobs: # fetch all commits to get last updated time or other git log info fetch-depth: 0 + - name: Setup pnpm + uses: pnpm/action-setup@v3 + with: + # choose pnpm version to use + version: 8 + # install deps with pnpm + run_install: true + - name: Setup Node.js uses: actions/setup-node@v4 with: # choose node.js version to use - node-version: "16" - - # cache node_modules - - name: Cache dependencies - uses: actions/cache@v4 - id: yarn-cache - with: - path: | - **/node_modules - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - # install dependencies if the cache did not hit - - name: Install dependencies - if: steps.yarn-cache.outputs.cache-hit != 'true' - run: yarn --frozen-lockfile + node-version: 20 + # cache deps for pnpm + cache: pnpm - name: Prettier check - run: npx prettier --check docs/ + run: pnpm prettier:check diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 71852c36cb5..066e29ce5ac 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -21,31 +21,25 @@ jobs: # fetch all commits to get last updated time or other git log info fetch-depth: 0 + - name: Setup pnpm + uses: pnpm/action-setup@v3 + with: + # choose pnpm version to use + version: 8 + # install deps with pnpm + run_install: true + - name: Setup Node.js uses: actions/setup-node@v4 with: # choose node.js version to use - node-version: "16" - - # cache node_modules - - name: Cache dependencies - uses: actions/cache@v4 - id: yarn-cache - with: - path: | - **/node_modules - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - # install dependencies if the cache did not hit - - name: Install dependencies - if: steps.yarn-cache.outputs.cache-hit != 'true' - run: yarn --frozen-lockfile + node-version: 20 + # cache deps for pnpm + cache: pnpm # run build script - name: Build VuePress site - run: yarn docs:build + run: pnpm docs:build # please check out the docs of the workflow for more details # @see https://github.com/crazy-max/ghaction-github-pages diff --git a/docs/.vuepress/components/ArticleInfo.vue b/docs/.vuepress/components/ArticleInfo.vue index e4ab2fad7b0..ece15e5b3c0 100644 --- a/docs/.vuepress/components/ArticleInfo.vue +++ b/docs/.vuepress/components/ArticleInfo.vue @@ -11,7 +11,7 @@ const { frontmatter } = toRefs(props);