Skip to content

Commit

Permalink
🧪 test(monorepo-1): 能完成特定目录的 vp-hope 部署。
Browse files Browse the repository at this point in the history
  • Loading branch information
ruan-cat committed Nov 30, 2024
1 parent 2be8bcd commit 4cf5e1a
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 24 deletions.
49 changes: 26 additions & 23 deletions .config/vercel-deploy-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,28 @@ export default <Config>{
// 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",
Expand Down Expand Up @@ -76,12 +79,12 @@ export default <Config>{
// },

// 工具包文档项目
{
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"],
// },
],
};
2 changes: 1 addition & 1 deletion tests/monorepo-1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
15 changes: 15 additions & 0 deletions tests/monorepo-1/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": [
"//"
],
"tasks": {
"vp-hope:build": {
"cache": false
},
"do-multi-build": {
"dependsOn": [
"vp-hope:build"
]
}
}
}

0 comments on commit 4cf5e1a

Please sign in to comment.