Skip to content

Commit 34eeaa8

Browse files
committed
ci(workflows): enable Corepack, use numeric node-version and add Node cache for docs workflows
Use numeric node-version (24) in `.github/workflows/docs.yml` and `.github/workflows/docs-publish.yml` Enable Corepack and run `corepack install` before installing dependencies Split node/cache setup to a dedicated `setup-node` step with `cache: yarn` Reorder and consolidate dependency install steps (Corepack prepare + yarn install --frozen-lockfile) Minor comment formatting fix in `docs-publish.yml`
1 parent f4c72f0 commit 34eeaa8

2 files changed

Lines changed: 34 additions & 9 deletions

File tree

.github/workflows/docs-publish.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,28 @@ jobs:
2323
2424
build-and-publish:
2525
needs: detect-quota
26-
# NOTE: do not set continue-on-error on detect-quota (see docs)
26+
# NOTE: do not set `continue-on-error` on detect-quota (see docs)
2727
runs-on: ${{ needs.detect-quota.result == 'success' && 'ubuntu-slim' || 'self-hosted' }}
2828
steps:
2929
- uses: actions/checkout@v4
3030

3131
- name: Use Node
3232
uses: actions/setup-node@v4
3333
with:
34-
node-version: "24"
35-
cache: "yarn"
34+
node-version: 24
3635

37-
- name: Install dependencies (Corepack + Yarn)
36+
- name: Enable Corepack
3837
run: |
3938
corepack enable
39+
corepack install
40+
41+
- name: Enable Node cache
42+
uses: actions/setup-node@v4
43+
with:
44+
cache: yarn
45+
46+
- name: Install dependencies (Corepack + Yarn)
47+
run: |
4048
corepack prepare yarn@stable --activate
4149
corepack yarn install --frozen-lockfile
4250

.github/workflows/docs.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,34 @@ jobs:
2727
runs-on: ${{ needs.detect-quota.result == 'success' && 'ubuntu-slim' || 'self-hosted' }}
2828
steps:
2929
- uses: actions/checkout@v4
30+
3031
- name: Use Node
3132
uses: actions/setup-node@v4
3233
with:
33-
node-version: "24"
34-
cache: "yarn"
34+
node-version: 24
35+
36+
- name: Enable Corepack
37+
run: |
38+
corepack enable
39+
corepack install
40+
41+
- name: Enable Node cache
42+
uses: actions/setup-node@v4
43+
with:
44+
cache: yarn
45+
3546
- name: Install dependencies
36-
run: yarn install --frozen-lockfile
47+
run: |
48+
yarn install --frozen-lockfile
49+
3750
- name: Build project
38-
run: yarn build
51+
run: |
52+
yarn build
53+
3954
- name: Generate TypeDoc
40-
run: yarn docs:typedoc
55+
run: |
56+
yarn docs:typedoc
57+
4158
- name: Upload artifact
4259
uses: actions/upload-artifact@v4
4360
with:

0 commit comments

Comments
 (0)