-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NT] Split out docs
dependencies
#2084
Conversation
docs
dependencies
@@ -32,15 +32,27 @@ commands: | |||
- checkout | |||
- restore_cache: | |||
keys: | |||
- v3-dependencies-{{ checksum "package.json" }} | |||
- v3-dependencies-{{ checksum "yarn.lock" }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated bug fix — the node_modules
cache should have been keyed by yarn.lock
, not package.json
.
- restore_cache: | ||
keys: | ||
- v3-docs-dependencies-{{ checksum "docs/yarn.lock" }} | ||
- v3-docs-dependencies | ||
- run: | ||
name: Install docs dependencies | ||
command: yarn install --frozen-lockfile | ||
working_directory: docs/ | ||
- save_cache: | ||
paths: | ||
- docs/node_modules | ||
key: v3-docs-dependencies-{{ checksum "docs/yarn.lock" }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Install the docs
dependencies in addition to the top-level dependencies.
- package-ecosystem: npm | ||
directory: "/docs" | ||
schedule: | ||
interval: weekly | ||
day: monday | ||
time: "05:00" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add dependabot updates for the docs dependencies.
- run: | ||
name: Build the documentation. | ||
command: | | ||
set -uex | ||
if [ << parameters.node_version >> -gt 16 ]; then | ||
# Without this, we get `Error: error:0308010C:digital envelope routines::unsupported` on Node >= 17. | ||
export NODE_OPTIONS="--openssl-legacy-provider" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build the docs as part of CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea 👍
Description, Motivation and Context
The dependencies in the top-level
package.json
file are not particularly representative of SPOT itself. Many of them, especially the large external libraries (including mobx and react 😱), are only needed for building the docs.This PR moves all of the docs-only dependencies out to their own
package.json
andyarn.lock
files. By having the docs dependencies separate, we should have a lot more confidence when upgrading external dependencies that we're not going to break the main application.