From d716b2b74ac87d3c7eb0fdfec5d189df71c0ac35 Mon Sep 17 00:00:00 2001 From: Alex Boungnaseng Date: Wed, 13 Nov 2024 15:20:50 +0100 Subject: [PATCH] fix(docs): fix prebuild documentation ref: MANAGER-14622 Signed-off-by: Alex Boungnaseng --- docs/.vitepress/.nojekyll | 0 docs/cli/prebuild.js | 4 ++-- docs/package.json | 2 +- packages/manager-react-components/.storybook/main.ts | 3 ++- .../manager-react-components/.storybook/ovh.theme.ts | 12 ++++++------ 5 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 docs/.vitepress/.nojekyll diff --git a/docs/.vitepress/.nojekyll b/docs/.vitepress/.nojekyll new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/docs/cli/prebuild.js b/docs/cli/prebuild.js index 2e8d61292122..a4a0fa6dd9f6 100644 --- a/docs/cli/prebuild.js +++ b/docs/cli/prebuild.js @@ -4,7 +4,7 @@ const path = require('path'); const pick = require('lodash/pick'); // Get all workspaces defined in the `package.json` file. -const { workspaces } = require('./../../package.json'); +const { workspaces } = require('../../package.json'); // Keep the bare minimum entries from all package.json files. const entries = ['name', 'version', 'description', 'repository']; @@ -19,7 +19,7 @@ const packages = getMonorepoPackages(directoryPath).map( ); // Group packages by their corresponding workspaces. -const groupedWorkspaces = workspaces.map((workspace) => { +const groupedWorkspaces = workspaces.packages.map((workspace) => { const packagesList = packages.filter((pkg) => { // Remove the pattern `/*` from the workspace name. if ( diff --git a/docs/package.json b/docs/package.json index ddbd4a36fd0b..72c6bb33774c 100644 --- a/docs/package.json +++ b/docs/package.json @@ -6,7 +6,7 @@ "scripts": { "docs:build": "yarn docs:build:manager-react-components && node cli/prebuild.js && vitepress build --base /manager/", "docs:build:manager-react-components": "cd ../packages/manager-react-components && yarn build:storybook && rm -rf ../../docs/docs/public/storybook-static && mkdir -p ../../docs/docs/public/storybook-static && cp -r ./storybook-static/* ../../docs/docs/public/storybook-static", - "docs:deploy": "yarn run docs:build && gh-pages -d .vitepress/dist -m \"docs: update documentation [skip ci]\"", + "docs:deploy": "yarn run docs:build && touch .vitepress/dist/storybook-static/.nojekyll && touch .vitepress/dist/.nojekyll && gh-pages -d .vitepress/dist --dotfiles -m \"docs: update documentation [skip ci]\"", "docs:dev": "node cli/prebuild.js && vitepress dev", "docs:preview": "vitepress preview" }, diff --git a/packages/manager-react-components/.storybook/main.ts b/packages/manager-react-components/.storybook/main.ts index 7ed4ee9e4a04..aa9258722f86 100644 --- a/packages/manager-react-components/.storybook/main.ts +++ b/packages/manager-react-components/.storybook/main.ts @@ -1,4 +1,5 @@ import { StorybookConfig } from '@storybook/react-vite'; + const config: StorybookConfig = { stories: [ '../src/**/*.stories.@(js|jsx|ts|tsx|mdx)', @@ -10,7 +11,7 @@ const config: StorybookConfig = { '@storybook/addon-essentials', '@storybook/addon-interactions', '@storybook/addon-styling', - '@storybook/addon-doc', + '@storybook/addon-docs', ], framework: { name: '@storybook/react-vite', diff --git a/packages/manager-react-components/.storybook/ovh.theme.ts b/packages/manager-react-components/.storybook/ovh.theme.ts index aae8c9aaebf5..60dd2f036147 100644 --- a/packages/manager-react-components/.storybook/ovh.theme.ts +++ b/packages/manager-react-components/.storybook/ovh.theme.ts @@ -4,11 +4,11 @@ export default create({ base: 'light', // Brand - colorPrimary: '#004FD6', - colorSecondary: '#004FD6', + // colorPrimary: '#004FD6', + // colorSecondary: '#004FD6', // UI - appBg: '#FF3358', + // appBg: '#FF3358', appBorderColor: '#004FD6', appBorderRadius: 0, appContentBg: '#ffffff', @@ -23,9 +23,9 @@ export default create({ textInverseColor: 'rgba(255,255,255,0.9)', // Toolbar default and active colors - barBg: '#f3fcff', - barSelectedColor: '#004FD6', - barTextColor: '#202124', + // barBg: '#f3fcff', + // barSelectedColor: '#004FD6', + // barTextColor: '#202124', // Form colors inputBg: '#ffffff',