Skip to content

Commit 036f02c

Browse files
committed
ci: always run yarn install command to ensure workspace links
1 parent 187aef3 commit 036f02c

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/docs.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212

1313
env:
1414
GA_ID: G-CTB8FQ7VMW
15+
NODE_VERSION: '14'
1516

1617
steps:
1718
- uses: actions/checkout@v2
@@ -21,20 +22,23 @@ jobs:
2122
- name: Setup Node.js
2223
uses: actions/setup-node@v1
2324
with:
24-
node-version: '14'
25+
node-version: ${{ env.NODE_VERSION }}
2526

26-
- name: Cache dependencies
27+
- name: Get yarn cache directory path
28+
id: yarn-cache-dir-path
29+
run: echo "::set-output name=dir::$(yarn cache dir)"
30+
31+
- name: Handle yarn cache
2732
uses: actions/cache@v2
2833
id: yarn-cache
2934
with:
30-
path: |
31-
**/node_modules
32-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
35+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
36+
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-yarn-${{ hashFiles('**/yarn.lock') }}
3337
restore-keys: |
34-
${{ runner.os }}-yarn-
38+
${{ runner.os }}-node-${{ env.NODE_VERSION }}-yarn-
39+
${{ runner.os }}-node-
3540
3641
- name: Install dependencies
37-
if: steps.yarn-cache.outputs.cache-hit != 'true'
3842
run: yarn --frozen-lockfile
3943

4044
- name: Copy and build

0 commit comments

Comments
 (0)