Skip to content

Commit 2837815

Browse files
committed
Add yarn cache
1 parent 60f4e13 commit 2837815

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/build_deploy.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,27 @@ jobs:
3030
- name: Prepare deploy
3131
run: make deploy
3232

33+
# node setup
34+
- name: Use Node.js ${{ matrix.node-version }}
35+
uses: actions/setup-node@v1
36+
working-directory: submodules/volto
37+
with:
38+
node-version: ${{ matrix.node-version }}
39+
40+
# node cache
41+
- name: Get yarn cache directory path
42+
id: yarn-cache-dir-path
43+
working-directory: submodules/volto
44+
run: echo "::set-output name=dir::$(yarn cache dir)"
45+
- uses: actions/cache@v1
46+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
47+
working-directory: submodules/volto
48+
with:
49+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
50+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
51+
restore-keys: |
52+
${{ runner.os }}-yarn-
53+
3354
- name: StoryBook build
3455
run: cd submodules/volto && yarn && yarn build-storybook -o _build/html/storybook
3556

0 commit comments

Comments
 (0)