From 5dd83c81eabe272de07da2162a958bfeeaeb63fc Mon Sep 17 00:00:00 2001 From: thislight Date: Wed, 23 Aug 2023 20:50:23 +0800 Subject: [PATCH] ci: setup pnpm --- .github/workflows/depoly.yml | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/depoly.yml b/.github/workflows/depoly.yml index 4ac74ea..4ac4ee3 100644 --- a/.github/workflows/depoly.yml +++ b/.github/workflows/depoly.yml @@ -11,23 +11,18 @@ jobs: uses: actions/checkout@v1 with: submodules: true # Checkout private submodules(themes or something else). - - # Caching dependencies to speed up workflows. (GitHub will remove any cache entries that have not been accessed in over 7 days.) - - name: Cache node modules - uses: actions/cache@v2 - id: cache + + - uses: pnpm/action-setup@v2 + name: Setup Pnpm with: - path: node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-node- - - run: 'curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -' - - run: 'echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list' - - run: "sudo apt update && sudo apt install yarn" - - - name: Install Dependencies - if: steps.cache.outputs.cache-hit != 'true' - run: pnpm install + version: 8 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: "18" + cache: pnpm + cache-dependency-path: '**/pnpm-lock.yaml' # Deploy hexo blog website. - name: Deploy