Skip to content

Commit ea45149

Browse files
committed
Get yarn cache directory
1 parent 0690a9e commit ea45149

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/deploy.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ jobs:
2222
node-version: '18'
2323
cache: 'yarn'
2424
registry-url: 'https://registry.npmjs.org'
25+
- name: Get yarn cache directory path
26+
id: yarn-cache-dir-path
27+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
2528
- name: Cache dependencies
2629
uses: actions/cache@v4
2730
with:
28-
path: |
29-
~/.cache
31+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
3032
key: dependencies-v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
3133
- name: Publish
3234
run: |

.github/workflows/test.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ jobs:
1919
with:
2020
node-version: '18'
2121
cache: 'yarn'
22+
- name: Get yarn cache directory path
23+
id: yarn-cache-dir-path
24+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
2225
- name: Cache dependencies
2326
uses: actions/cache@v4
2427
with:
25-
path: |
26-
~/.cache
28+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
2729
key: dependencies-v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
2830
- name: Install
2931
run: yarn install --frozen-lockfile --ignore-scripts --prefer-offline

0 commit comments

Comments
 (0)