Skip to content

Commit 3c3342e

Browse files
authored
[CI] Simplify cSpell dict install and other script tweaks (#5010)
1 parent 6cd83a2 commit 3c3342e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/check-spelling.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
- run: npm run install:dict --ignore-scripts
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version-file: .nvmrc
16+
- run: npm run _install:dict --ignore-scripts
1417
- uses: streetsidesoftware/cspell-action@v6
1518
with:
1619
# Files should be consistent with check:spelling files

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
"_get:submodule:non-lang": "npm run _get:submodule -- content-modules/opentelemetry-specification themes/docsy",
2626
"_get:submodule": "set -x && git submodule update --init ${DEPTH:- --depth 1}",
2727
"_hugo": "hugo --cleanDestinationDir",
28+
"_install:dict": "npm install -D $(npm run -s _list:dict)",
29+
"_install:netlify-cli": "npm list netlify-cli || npm install -O netlify-cli",
2830
"_list:check:*": "npm run --loglevel=warn | grep -Ee '^\\s*check:[^:]+$'",
2931
"_list:dict": "grep '^\\s*\"@cspell' package.json | awk -F: '{print $1}' | tr -d '\"'",
3032
"_list:fix:*": "npm run --loglevel=warn | grep -Ee '^\\s*fix:[^:]+$' | grep -v 'fix:all'",
@@ -73,8 +75,6 @@
7375
"fix": "npm run fix:all",
7476
"format": "npm run _check:format -- --write && npm run _check:format:ja+zh -- --write",
7577
"get:submodule": "npm run _get:${GET:-submodule}",
76-
"install:dict": "bash -c 'for pkg in \"$(npm run -s _list:dict)\"; do npm list $pkg || npm install $pkg; done'",
77-
"install:netlify-cli": "npm list netlify-cli || npm install netlify-cli",
7878
"log:check:links": "npm run check:links | tee tmp/build-log.txt",
7979
"make:public": "make public ls-public",
8080
"netlify-build:preview": "npm run seq -- build:preview diff:check",
@@ -92,7 +92,7 @@
9292
"prenetlify-build:production": "echo 'IgnoreTagAttribute: rel' >> .htmltest.yml",
9393
"prepare": "npm run seq -- get:submodule _prepare:docsy",
9494
"preserve:hugo": "npm run _prebuild",
95-
"preserve:netlify": "npm run seq -- _prebuild install:netlify-cli",
95+
"preserve:netlify": "npm run seq -- _prebuild _install:netlify-cli",
9696
"schemas:update": "npm run update:submodule content-modules/opentelemetry-specification",
9797
"seq": "bash -c 'for cmd in \"$@\"; do npm run $cmd || exit 1; done' - ",
9898
"serve:hugo": "npm run _serve:hugo -- --renderToMemory",

0 commit comments

Comments
 (0)