From 4ce3299ae2100a5434011b397643e5c24627410e Mon Sep 17 00:00:00 2001
From: Soha Jin <soha@jin.sh>
Date: Tue, 10 Dec 2024 08:27:05 +0000
Subject: [PATCH] fix actions

---
 .github/workflows/build.yml  | 31 ++++++++-----------------------
 .github/workflows/deploy.yml |  2 +-
 2 files changed, 9 insertions(+), 24 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 165533d..725d454 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -13,33 +13,18 @@ jobs:
         runs-on: ubuntu-latest
         steps:
           - name: checkout
-            uses: actions/checkout@v3
+            uses: actions/checkout@v4
 
-          - name: install node.js
-            uses: actions/setup-node@v3
-            with:
-                node-version: 18
-
-          - uses: pnpm/action-setup@v2
-            name: install pnpm
-            id: pnpm-install
+          - uses: pnpm/action-setup@v4
+            name: Install pnpm
             with:
-                version: 8
                 run_install: false
 
-          - name: get pnpm store
-            id: pnpm-cache
-            shell: bash
-            run: |
-                echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
-
-          - name: set up pnpm cache
-            uses: actions/cache@v3
+          - name: install node.js
+            uses: actions/setup-node@v4
             with:
-                path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
-                key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
-                restore-keys: |
-                    ${{ runner.os }}-pnpm-store-
+                node-version: 20
+                cache: 'pnpm'
 
           - name: install dependencies
             run: pnpm install
@@ -48,7 +33,7 @@ jobs:
             run: pnpm run build
 
           - name: upload artifact
-            uses: actions/upload-artifact@v3
+            uses: actions/upload-artifact@v4
             with:
                 name: help-site
                 path: build
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 33132ff..d4a6aff 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -49,7 +49,7 @@ jobs:
         if: needs.check.outputs.secrets == 'ok'
         steps:
           - name: checkout
-            uses: actions/checkout@v3
+            uses: actions/checkout@v4
 
           - name: setup python
             uses: actions/setup-python@v4