Skip to content

Commit e9ddcb2

Browse files
committed
Fix docusaurus CI build by switching from yarn to npm
The contrib/docs project uses npm (has package-lock.json, no yarn.lock) but the workflow was using yarn with cache: yarn. This caused webpack Progress Plugin validation errors. Switch to npm ci for deterministic installs matching the lockfile.
1 parent b672ef3 commit e9ddcb2

1 file changed

Lines changed: 6 additions & 17 deletions

File tree

.github/workflows/docusaurus-gh-pages.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ jobs:
3434
uses: actions/checkout@v3
3535
with:
3636
fetch-depth: 1000
37-
# 👇 Build steps
3837
- name: Set up Python 3.10
3938
uses: actions/setup-python@v4
4039
with:
@@ -51,19 +50,14 @@ jobs:
5150
uses: actions/setup-node@v3
5251
with:
5352
node-version: 20.x
54-
cache: yarn
55-
# The action defaults to search for the dependency file
56-
# (package-lock.json or yarn.lock) in the repository root, and uses
57-
# its hash as a part of the cache key.
58-
# https://github.com/actions/setup-node#caching-packages-dependencies
53+
cache: npm
5954
cache-dependency-path: "./contrib/docs/package-lock.json"
6055
- name: Install dependencies
6156
working-directory: contrib/docs
62-
run: yarn install --frozen-lockfile --non-interactive
57+
run: npm ci
6358
- name: Build
6459
working-directory: contrib/docs
65-
run: yarn build
66-
# 👆 Build steps
60+
run: npm run build
6761
deploy:
6862
if: ${{ github.ref == 'refs/heads/main' }}
6963
environment:
@@ -92,19 +86,14 @@ jobs:
9286
uses: actions/setup-node@v3
9387
with:
9488
node-version: 20.x
95-
cache: yarn
96-
# The action defaults to search for the dependency file
97-
# (package-lock.json or yarn.lock) in the repository root, and uses
98-
# its hash as a part of the cache key.
99-
# https://github.com/actions/setup-node#caching-packages-dependencies
89+
cache: npm
10090
cache-dependency-path: "./contrib/docs/package-lock.json"
10191
- name: Install dependencies
10292
working-directory: contrib/docs
103-
run: yarn install --frozen-lockfile --non-interactive
93+
run: npm ci
10494
- name: Build
10595
working-directory: contrib/docs
106-
run: yarn build
107-
# 👆 Build steps
96+
run: npm run build
10897
- name: Setup Pages
10998
uses: actions/configure-pages@v3
11099
- name: Upload artifact

0 commit comments

Comments
 (0)