Skip to content

Commit c29047f

Browse files
committed
chore: add caching for pnpm in CI workflows
1 parent f6914b7 commit c29047f

2 files changed

Lines changed: 18 additions & 15 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@ jobs:
1818
- name: Checkout code
1919
uses: actions/checkout@v4
2020

21-
- name: Setup Node.js
22-
uses: actions/setup-node@v4
23-
with:
24-
node-version: "22"
25-
2621
- uses: pnpm/action-setup@v4
2722
name: Install pnpm
2823
id: pnpm-install
2924
with:
3025
run_install: false
3126

27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: "22"
31+
cache: "pnpm"
32+
3233
- name: Get pnpm store directory
3334
id: pnpm-cache
3435
shell: bash

‎.github/workflows/pages-build-site.yml‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,18 @@ jobs:
2626
- name: Checkout
2727
uses: actions/checkout@v6
2828

29-
- name: Install Node.js
30-
uses: actions/setup-node@v6
31-
with:
32-
node-version: "22"
33-
3429
- uses: pnpm/action-setup@v4
3530
name: Install pnpm
3631
id: pnpm-install
3732
with:
3833
run_install: false
3934

35+
- name: Install Node.js
36+
uses: actions/setup-node@v6
37+
with:
38+
node-version: "22"
39+
cache: "pnpm"
40+
4041
- name: Get pnpm store directory
4142
id: pnpm-cache
4243
shell: bash
@@ -68,17 +69,18 @@ jobs:
6869
- name: Checkout
6970
uses: actions/checkout@v6
7071

71-
- name: Install Node.js
72-
uses: actions/setup-node@v6
73-
with:
74-
node-version: "22"
75-
7672
- uses: pnpm/action-setup@v4
7773
name: Install pnpm
7874
id: pnpm-install
7975
with:
8076
run_install: false
8177

78+
- name: Install Node.js
79+
uses: actions/setup-node@v6
80+
with:
81+
node-version: "22"
82+
cache: "pnpm"
83+
8284
- name: Get pnpm store directory
8385
id: pnpm-cache
8486
shell: bash

0 commit comments

Comments
 (0)