From 22cf6155ff65eb28eac5346fdfdac98665547cfd Mon Sep 17 00:00:00 2001 From: Woon Eusean <20278298+wooneusean@users.noreply.github.com> Date: Sun, 29 Oct 2023 02:54:36 +0800 Subject: [PATCH 1/2] Add pnpm cache to actions --- .github/workflows/main.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3e89227..7134736 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,6 +17,20 @@ jobs: with: version: 8.7.6 + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. run: | pnpm install From 3bd1c3244f99229c2a8bfb1eee4a952432e57ba5 Mon Sep 17 00:00:00 2001 From: Woon Eusean <20278298+wooneusean@users.noreply.github.com> Date: Sun, 29 Oct 2023 03:08:08 +0800 Subject: [PATCH 2/2] Update main.yml --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7134736..c4532c8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,6 +3,8 @@ on: push: branches: - main + workflow_dispatch: + permissions: contents: write jobs: