From ea2118270c933e094b957ec4a0633f90eaa5d56a Mon Sep 17 00:00:00 2001 From: heygsc <1596920983@qq.com> Date: Thu, 29 Aug 2024 16:14:36 +0800 Subject: [PATCH] Update node.js.yml --- .github/workflows/node.js.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index fd3ded6..5d0b316 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,6 +1,3 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - name: vitepress on: @@ -11,22 +8,21 @@ on: jobs: build: - - runs-on: ubuntu-latest - + runs-on: ubuntu-22.04 strategy: matrix: - node-version: [18.x, 20.x, 22.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - + node-version: [20] steps: - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm install -g pnpm - - run: pnpm install + cache: 'pnpm' + - name: Install dependencies + run: pnpm install - run: pnpm run docs:build