From 44bbdcca1aa91f4be2987083786fc5f4f622c5c6 Mon Sep 17 00:00:00 2001 From: minimouse0 <473147334@qq.com> Date: Tue, 13 Aug 2024 23:29:30 +0800 Subject: [PATCH] =?UTF-8?q?=EF=BC=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 18 ++++++------------ .github/workflows/wiki-deploy.yml | 20 ++++++++------------ 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 42951138e..50f5f8ee1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,18 +10,12 @@ jobs: # 拉取代码 - name: Checkout uses: actions/checkout@v4 - - name: Use Node.js 20 - uses: actions/setup-node@v3 + - name: "setup pnpm" + uses: "pnpm/action-setup@v4" + - name: "setup node" + + uses: "actions/setup-node@v4" with: node-version: 20 - # 启用缓存加速 - - name: Cache - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - # 安装 Npm 并构建 - name: Install and Build - run: npm install && npm run build \ No newline at end of file + run: pnpm install && pnpm run build diff --git a/.github/workflows/wiki-deploy.yml b/.github/workflows/wiki-deploy.yml index fd080e39a..a58c0b511 100644 --- a/.github/workflows/wiki-deploy.yml +++ b/.github/workflows/wiki-deploy.yml @@ -27,21 +27,17 @@ jobs: # 拉取代码 - name: Checkout uses: actions/checkout@v4 - - name: Use Node.js 20 - uses: actions/setup-node@v3 + - name: "setup pnpm" + uses: "pnpm/action-setup@v4" + - name: "setup node" + uses: "actions/setup-node@v4" with: node-version: 20 - # 启用缓存加速部署 - - name: Cache - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} # 安装 Npm 并构建 - - name: Install and Build - run: npm install && npm run build + - name: Install + run: pnpm install + - name: Build + run: pnpm run build # 部署 - name: Deploy uses: JamesIves/github-pages-deploy-action@v4