From ee4186b305031b7cc65ebf6e4289c0d3146cb3f4 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 30 Nov 2021 06:41:13 -0800 Subject: [PATCH] build: add tools/doc to tools.yml updates PR-URL: https://github.com/nodejs/node/pull/41036 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Yash Ladha --- .github/workflows/tools.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index d4f7a5d68c858e..5750c41b0fc775 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -39,6 +39,20 @@ jobs: cd ../.. make lint-md-rollup fi + - id: doc + run: | + cd tools/doc + npm ci + NEW_VERSION=$(npm outdated --parseable | cut -d: -f4 | xargs) + if [ "$NEW_VERSION" != "" ]; then + echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV + rm -rf package-lock.json node_modules + # Include $NEW_VERSION to explicitly update the package.json + # entry for the dependency and also so that semver-major updates + # are not skipped. + npm install --ignore-scripts $NEW_VERSION + npm install --ignore-scripts + fi steps: - uses: actions/checkout@v2 with: