Skip to content

Commit 67aa6ed

Browse files
committed
fix: workflow should use yarn 4 not 1
1 parent a1607f7 commit 67aa6ed

File tree

2 files changed

+24
-18
lines changed

2 files changed

+24
-18
lines changed

.github/workflows/build-docs-site.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,21 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
15+
16+
- name: Set Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 20.x
20+
21+
- name: Corepack enable
22+
run: corepack enable
23+
24+
- name: Yarn setup
25+
run: corepack prepare --activate
1526

1627
- name: Get yarn cache directory path
1728
id: yarn-cache-dir-path
18-
run: echo "::set-output name=dir::$(yarn cache dir)"
29+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
1930

2031
- uses: actions/cache@v4
2132
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
@@ -25,10 +36,7 @@ jobs:
2536
restore-keys: |
2637
${{ runner.os }}-yarn-
2738
28-
- name: Set Node.js
29-
uses: actions/setup-node@v4
30-
with:
31-
node-version: 20.x
39+
3240

3341
- name: Install dependencies
3442
run: yarn install

.github/workflows/deploy.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,22 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
12-
13-
- name: Get yarn cache directory path
14-
id: yarn-cache-dir-path
15-
run: echo "::set-output name=dir::$(yarn cache dir)"
16-
17-
- uses: actions/cache@v4
18-
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
19-
with:
20-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
21-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
22-
restore-keys: |
23-
${{ runner.os }}-yarn-
24-
12+
2513
- name: Set Node.js
2614
uses: actions/setup-node@v4
2715
with:
2816
node-version: 20.x
2917

18+
- name: Corepack enable
19+
run: corepack enable
20+
21+
- name: Yarn setup
22+
run: corepack prepare --activate
23+
24+
- name: Get yarn cache directory path
25+
id: yarn-cache-dir-path
26+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
27+
3028
- name: Install dependencies
3129
run: yarn install
3230

0 commit comments

Comments
 (0)