diff --git a/.config/vercel-deploy-tool.ts b/.config/vercel-deploy-tool.ts index 9d52f68..d90d1f9 100644 --- a/.config/vercel-deploy-tool.ts +++ b/.config/vercel-deploy-tool.ts @@ -10,25 +10,28 @@ export default { // FIXME: execa运行的turbo命令,不会使用cache缓存,导致了重复构建。 deployTargets: [ // 01星球建议笔记 - { - type: "userCommands", - targetCWD: "./docs/docs-01-star", - url: ["docs-01-star.ruancat6312.top"], - outputDirectory: "config/.vitepress/dist/**/*", - userCommands: [ - "pnpm -C=./docs/docs-01-star build:docs", - // "pnpm -C='./' turbo build:docs", - // "pnpm turbo build:docs", - ], - }, - // 1号项目 // { // type: "userCommands", - // targetCWD: "./packages/monorepo-1", - // outputDirectory: "src/.vuepress/dist/**/*", - // url: ["monorepo-1.ruancat6312.top"], - // userCommands: ["pnpm -C=./packages/monorepo-1 build:docs"], + // targetCWD: "./docs/docs-01-star", + // url: ["docs-01-star.ruancat6312.top"], + // outputDirectory: "config/.vitepress/dist/**/*", + // userCommands: [ + // "pnpm -C=./docs/docs-01-star build:docs", + // // "pnpm -C='./' turbo build:docs", + // // "pnpm turbo build:docs", + // ], // }, + + // 1号项目 + { + type: "userCommands", + targetCWD: "./tests/monorepo-1", + isCopyDist: false, + outputDirectory: "src/.vuepress/dist/**/*", + url: ["monorepo-1.ruancat6312.top"], + userCommands: ["pnpm -C=./tests/monorepo-1 build:docs"], + }, + // 2号项目 通过测试 多域名可以实现部署 // { // type: "userCommands", @@ -76,12 +79,12 @@ export default { // }, // 工具包文档项目 - { - type: "userCommands", - targetCWD: "./packages/utils", - outputDirectory: "docs/.vuepress/dist/**/*", - url: ["utils.ruancat6312.top", "utils.ruan-cat.com"], - userCommands: ["pnpm -C=./packages/utils build:docs"], - }, + // { + // type: "userCommands", + // targetCWD: "./packages/utils", + // outputDirectory: "docs/.vuepress/dist/**/*", + // url: ["utils.ruancat6312.top", "utils.ruan-cat.com"], + // userCommands: ["pnpm -C=./packages/utils build:docs"], + // }, ], }; diff --git a/tests/monorepo-1/package.json b/tests/monorepo-1/package.json index ab0d896..20b84dd 100644 --- a/tests/monorepo-1/package.json +++ b/tests/monorepo-1/package.json @@ -6,7 +6,7 @@ "license": "MIT", "type": "module", "scripts": { - "build:docs": "vuepress-vite build src", + "build:docs": "turbo do-multi-build", "vp-hope:dev": "vuepress-vite dev docs --clean-cache -c src/configs/vp-hope/config.ts", "vp-hope:build": "vuepress-vite build docs -c src/configs/vp-hope/config.ts", "docs:update-package": "pnpm dlx vp-update", diff --git a/tests/monorepo-1/turbo.json b/tests/monorepo-1/turbo.json new file mode 100644 index 0000000..cfcc608 --- /dev/null +++ b/tests/monorepo-1/turbo.json @@ -0,0 +1,15 @@ +{ + "extends": [ + "//" + ], + "tasks": { + "vp-hope:build": { + "cache": false + }, + "do-multi-build": { + "dependsOn": [ + "vp-hope:build" + ] + } + } +} \ No newline at end of file