From 2656398ea04b0cad2295b6db7e4f1d6777de02b3 Mon Sep 17 00:00:00 2001 From: Chris Maniewski Date: Tue, 29 Oct 2024 21:47:50 +0800 Subject: [PATCH] fix: add pnpm to ci workflow --- .github/workflows/ci.yml | 51 +++++++++++++++++++++++++++++++++++----- .nvmrc | 2 +- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c40da42..2c43d39e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,9 +17,22 @@ jobs: fetch-depth: 0 submodules: true - - uses: actions/setup-node@v3 + - uses: pnpm/action-setup@v4 with: - node-version: 16 + version: 9.12.1 + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'pnpm' + + - name: Cache NPM dependencies + uses: actions/cache@v4 + id: cache + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }} - name: Install ⚙️ run: pnpm install --frozen-lockfile @@ -40,9 +53,22 @@ jobs: fetch-depth: 0 submodules: true - - uses: actions/setup-node@v3 + - uses: pnpm/action-setup@v4 + with: + version: 9.12.1 + + - name: Setup node + uses: actions/setup-node@v3 with: - node-version: 16 + node-version-file: '.nvmrc' + cache: 'pnpm' + + - name: Cache NPM dependencies + uses: actions/cache@v4 + id: cache + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }} - name: Install ⚙️ run: pnpm install --frozen-lockfile @@ -70,9 +96,22 @@ jobs: fetch-depth: 0 submodules: true - - uses: actions/setup-node@v3 + - uses: pnpm/action-setup@v4 + with: + version: 9.12.1 + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'pnpm' + + - name: Cache NPM dependencies + uses: actions/cache@v4 + id: cache with: - node-version: 16 + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }} - name: Install Docusaurus ⚙️ run: pnpm install --frozen-lockfile diff --git a/.nvmrc b/.nvmrc index a3597ecb..87834047 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.11 +20.12.2