Skip to content

Commit 55ebfce

Browse files
ci: cache node_modules
1 parent dc13ae8 commit 55ebfce

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/node.js.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,21 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@v2
23+
2324
- name: Use Node.js ${{ matrix.node-version }}
2425
uses: actions/setup-node@v1
2526
with:
2627
node-version: ${{ matrix.node-version }}
28+
29+
# @see https://zenn.dev/odan/scraps/81b2738864a908#comment-71195269e61d4f
30+
- name: cache node_modules
31+
id: node_modules_cache_id
32+
uses: actions/cache@v2
33+
with:
34+
path: |
35+
node_modules
36+
key: node-v${{ matrix.node-version }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
37+
2738
- run: yarn install --frozen-lockfile
2839
- run: yarn ci
2940
- run: yarn build-storybook

0 commit comments

Comments
 (0)