Skip to content

Commit 6bf34a0

Browse files
committed
fix: Node modules caching
1 parent 34aec3a commit 6bf34a0

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

.github/workflows/build.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,18 @@ jobs:
2121
uses: actions/setup-node@v4
2222
with:
2323
node-version: latest
24-
cache: npm
24+
25+
- id: cache
26+
uses: actions/cache@v4
27+
with:
28+
path: "**/node_modules"
29+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
30+
restore-keys: |
31+
${{ runner.os }}-node-
2532
2633
- name: Install dependencies
2734
run: npm ci
35+
if: steps.cache.outputs.cache-hit != 'true'
2836

2937
- name: Build
3038
run: npm run build

.github/workflows/deploy-docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- id: cache
2929
uses: actions/cache@v4
3030
with:
31-
path: "**/node_modules/**"
31+
path: "**/node_modules"
3232
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
3333
restore-keys: |
3434
${{ runner.os }}-node-

.github/workflows/publish-sdk.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- id: cache
2323
uses: actions/cache@v4
2424
with:
25-
path: "**/node_modules/**"
25+
path: "**/node_modules"
2626
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2727
restore-keys: |
2828
${{ runner.os }}-node-

.github/workflows/publish-templates.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- id: cache
2323
uses: actions/cache@v4
2424
with:
25-
path: "**/node_modules/**"
25+
path: "**/node_modules"
2626
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2727
restore-keys: |
2828
${{ runner.os }}-node-

0 commit comments

Comments
 (0)