Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

fix: update pull request workflow to enhance caching for Next.js and pnpm

AykutSaracbfdd70cb5f7f
diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml
index 505dd6b1..0f703735 100644
--- a/.github/workflows/pull-request.yml
+++ b/.github/workflows/pull-request.yml
@@ -16,6 +16,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 20
+ cache: pnpm
+ cache-dependency-path: pnpm-lock.yaml
- uses: pnpm/action-setup@v2
name: Install pnpm
@@ -23,18 +25,14 @@ jobs:
version: 8
run_install: false
- - 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
+ - name: Restore Next.js cache
+ uses: actions/cache@v4
with:
- path: ${{ env.STORE_PATH }}
- key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
+ path: |
+ .next/cache
+ key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
- ${{ runner.os }}-pnpm-store-
+ ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
- name: Install dependencies
run: pnpm install
@@ -45,4 +43,4 @@ jobs:
- name: Build
run: pnpm run build
-
\ No newline at end of file
+