diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c901539a8..059e72171 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,22 +31,10 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - - name: Install and Build - env: - XRAY_DOCS_USE_VITE: "true" - NODE_OPTIONS: "--max_old_space_size=4096" - run: | - pnpm install - yarn docs:build - - name: Deploy - if: github.event_name != 'pull_request' - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/.vuepress/dist + - name: Install + run: pnpm install - name: Build for Main Repository env: - XRAY_DOCS_MAIN_REPO: "true" NODE_OPTIONS: "--max_old_space_size=4096 --openssl-legacy-provider" run: | yarn docs:build diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index 2bbcac52a..992ac3f4e 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -15,10 +15,8 @@ import i18nPlugin from "vuepress-plugin-i18n"; const __dirname = getDirname(import.meta.url) console.log('>>> __dirname -> ', __dirname) const isProduction = process.env.NODE_ENV === "production"; -const forMainRepo = process.env.XRAY_DOCS_MAIN_REPO === "true"; const useVite = process.env.XRAY_DOCS_USE_VITE === "true"; -console.log("base:", forMainRepo ? "/" : "/Xray-docs-next/"); console.log( "bundler:", isProduction && !useVite ? "@vuepress/webpack" : "@vuepress/vite" @@ -52,7 +50,7 @@ export default defineUserConfig({ componentsDir: path.resolve(__dirname, './theme/components'), }), ], - base: forMainRepo ? "/" : "/Xray-docs-next/", + base: "/", locales: { "/": { lang: "zh-CN",