Skip to content

Commit 5b008d0

Browse files
authored
Caches node modules on biuld
1 parent e17771c commit 5b008d0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ jobs:
1717
uses: actions/setup-node@v1
1818
with:
1919
node-version: ${{ matrix.node-version }}
20+
- name: Cache node modules
21+
uses: actions/cache@v2
22+
env:
23+
cache-name: cache-node-modules
24+
with:
25+
# npm cache files are stored in `~/.npm` on Linux/macOS
26+
path: ~/.npm
27+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
28+
restore-keys: |
29+
${{ runner.os }}-build-${{ env.cache-name }}-
30+
${{ runner.os }}-build-
31+
${{ runner.os }}-
2032
- run: npm install
2133
- run: npm run build --if-present
2234
env:

0 commit comments

Comments
 (0)