fix(ci): fix GHA for docs during PRs (#35186)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Evan Rusackas <evan@rusackas.com>
This commit is contained in:
Joe Li
2025-10-01 10:13:47 -07:00
committed by GitHub
parent 7c415c7cd9
commit 28389de93e
4 changed files with 62 additions and 13 deletions

32
docs/src/theme.d.ts vendored Normal file
View File

@@ -0,0 +1,32 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
declare module '@theme/Layout' {
import type { ReactNode } from 'react';
export interface Props {
readonly children?: ReactNode;
readonly noFooter?: boolean;
readonly wrapperClassName?: string;
readonly title?: string;
readonly description?: string;
}
export default function Layout(props: Props): ReactNode;
}

View File

@@ -23,8 +23,8 @@ import type { Plugin } from '@docusaurus/types';
export default function webpackExtendPlugin(): Plugin<void> {
return {
name: 'custom-webpack-plugin',
configureWebpack(config, isServer, utils) {
const { isDev } = utils;
configureWebpack(config) {
const isDev = process.env.NODE_ENV === 'development';
return {
devtool: isDev ? 'eval-source-map' : config.devtool,
...(isDev && {

View File

@@ -2,12 +2,27 @@
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": "."
"baseUrl": ".",
"skipLibCheck": true,
"noImplicitAny": false,
"strict": false,
"types": ["@docusaurus/module-type-aliases"]
},
"jsx": "react-jsx",
"moduleResolution": "node",
"baseUrl": "./",
"paths": {
"@superset-ui/core": ["../superset-frontend/packages/superset-ui-core/src"],
"@superset-ui/core/*": ["../superset-frontend/packages/superset-ui-core/src/*"],
"*": ["src/*", "node_modules/*"]
}
},
"include": [
"src/**/*.ts",
"src/**/*.tsx"
],
"exclude": [
"node_modules",
"../superset-frontend/**/*",
"src/webpack.extend.ts"
]
}