fix(docs): fix github actions docs workflow dependencies and yarn lockfiles #4023
+5,630
−4,889
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Fixes # (issue)
Type of change
How Has This Been Tested?
exampleappChecklist
yarn docs-build-apiAdditional context
This PR fixes the broken documentation build pipeline that was failing due to dependency version mismatches and missing packages.
Changes
1. Removed
js-yamlresolution (package.json, website/package.json)"js-yaml": "^4.1.1"was incompatible withgray-matter(used by Docusaurus for parsing Markdown front matter)gray-matterusesyaml.safeLoad()which was removed in js-yaml 4.x as a breaking changegray-matterexpects2. Updated Docusaurus packages to 2.4.3 (website/package.json)
@docusaurus/*packages must have the same version^2.3.0to2.4.3for consistency:@docusaurus/core@docusaurus/plugin-client-redirects@docusaurus/plugin-google-analytics@docusaurus/plugin-google-gtag@docusaurus/preset-classic@docusaurus/theme-live-codeblock@docusaurus/types@docusaurus/module-type-aliases3. Added missing dependencies (website/package.json)
tailwindcss: ^3.4.0- required by Docusaurus 2.4.3 PostCSSautoprefixer: ^10.4.16- PostCSS dependency4. Regenerated lockfiles
yarn.lock- root lockfilewebsite/yarn.lock- website lockfile synced with updated dependenciesTesting
Verified the fix with multiple testing approaches:
GitHub Actions simulation (using
act):Docker container:
Local build and serve:
All tests confirmed that the documentation builds successfully and can be served without errors.
Related Files
package.json- removed js-yaml resolutionwebsite/package.json- updated docusaurus versions, added tailwindcss/autoprefixeryarn.lock- regeneratedwebsite/yarn.lock- regenerated