Skip to content

Commit fc4bd3f

Browse files
authored
ci: setup pnpm cache (#110)
* ci: setup pnpm cache * ci: fix step name * step name
1 parent 28692e5 commit fc4bd3f

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,20 @@ jobs:
2222
with:
2323
node-version: ${{ matrix.node-version }}
2424
cache: 'pnpm'
25+
26+
- name: Get pnpm cache directory
27+
id: pnpm-cache
28+
shell: bash
29+
run: echo "dir=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
30+
31+
- name: Setup pnpm cache
32+
uses: actions/cache@v3
33+
with:
34+
path: ${{ steps.pnpm-cache.outputs.dir }}
35+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
36+
restore-keys: |
37+
${{ runner.os }}-pnpm-store-
38+
2539
- name: Install Dependencies
2640
run: pnpm install
2741

.github/workflows/test.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@ jobs:
3131
with:
3232
node-version: ${{ matrix.node-version }}
3333
cache: 'pnpm'
34+
35+
- name: Get pnpm cache directory
36+
id: pnpm-cache
37+
shell: bash
38+
run: echo "dir=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
39+
40+
- name: Setup pnpm cache
41+
uses: actions/cache@v3
42+
with:
43+
path: ${{ steps.pnpm-cache.outputs.dir }}
44+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
45+
restore-keys: |
46+
${{ runner.os }}-pnpm-store-
47+
3448
- name: Install Dependencies
3549
run: pnpm install
3650
- name: Install Playwright

0 commit comments

Comments
 (0)