Skip to content

Commit

Permalink
🐎 ci: 不提供工作流内写死的移动命令;使用树形图输出内容;
Browse files Browse the repository at this point in the history
  • Loading branch information
ruan-cat committed Jun 30, 2024
1 parent 9f51f7b commit 00d7c91
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/use-vercel-cli-build-try-3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
- name: turbo并发运行打包命令
run: pnpm run on-github-action-flow

- name: 手动移动文件
run: |
rm -rf ./packages/monorepo-3/.vercel/output/static
pnpm cpx "packages/monorepo-3/src/.vuepress/dist/**/*" packages/monorepo-3/.vercel/output/static
# - name: 手动移动文件
# run: |
# rm -rf ./packages/monorepo-3/.vercel/output/static
# pnpm cpx "packages/monorepo-3/src/.vuepress/dist/**/*" packages/monorepo-3/.vercel/output/static

- name: 部署到vercel内
run: |
Expand Down
2 changes: 1 addition & 1 deletion packages/monorepo-1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"docs:clean-dev": "vuepress-vite dev src --clean-cache",
"docs:dev": "vuepress-vite dev src",
"docs:update-package": "pnpm dlx vp-update",
"copy-dist": "rimraf .vercel/output/static && mkdirp .vercel/output/static && cpx \"src/.vuepress/dist/**/*\" .vercel/output/static && shx ls .vercel/output/static",
"copy-dist": "rimraf .vercel/output/static && mkdirp .vercel/output/static && cpx \"src/.vuepress/dist/**/*\" .vercel/output/static && shx ls -R .vercel/output/static",
"clear": "rimraf dist && rimraf .turbo && rimraf .vercel"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/monorepo-3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"docs:clean-dev": "vuepress-vite dev src --clean-cache",
"docs:dev": "vuepress-vite dev src",
"docs:update-package": "pnpm dlx vp-update",
"copy-dist": "rimraf .vercel/output/static && mkdirp .vercel/output/static && cpx \"src/.vuepress/dist/**/*\" .vercel/output/static && shx ls .vercel/output/static",
"copy-dist": "rimraf .vercel/output/static && mkdirp .vercel/output/static && cpx \"src/.vuepress/dist/**/*\" .vercel/output/static && shx ls -R .vercel/output/static",
"clear": "rimraf dist && rimraf .turbo && rimraf .vercel"
},
"devDependencies": {
Expand Down
8 changes: 8 additions & 0 deletions packages/monorepo-3/src/typedoc-api/typedoc-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

你好,这里是文档。自动生成的文档。

## 文件移动

请使用 node包 rimraf 和 cpx 编写一段命令,完成以下需求:

1. 清空文件夹 `.vercel/output/static`
Expand All @@ -13,3 +15,9 @@
1. 这段命令最终会运行到github action内,请确保该命令可以在window系统和linux系统内均可运行。
2. 这段命令要封装在package.json的copy-dist命令内。
3. 如果 `.vercel/output/static` 不存在,请新建文件夹,并确保上述命令不会出错。

## 树形图

请优化上述的命令,确保以树形图的方式输出整个 `.vercel/output/static` 文件夹内的全部文件。

1. 请使用linux和window系统下都能够成功运行的命令。
2 changes: 1 addition & 1 deletion packages/monorepo-4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"docs:clean-dev": "vuepress-vite dev src --clean-cache",
"docs:dev": "vuepress-vite dev src",
"docs:update-package": "pnpm dlx vp-update",
"copy-dist": "rimraf .vercel/output/static && mkdirp .vercel/output/static && cpx \"src/.vuepress/dist/**/*\" .vercel/output/static && shx ls .vercel/output/static",
"copy-dist": "rimraf .vercel/output/static && mkdirp .vercel/output/static && cpx \"src/.vuepress/dist/**/*\" .vercel/output/static && shx ls -R .vercel/output/static",
"clear": "rimraf dist && rimraf .turbo && rimraf .vercel"
}
}
2 changes: 1 addition & 1 deletion packages/monorepo-5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"docs:clean-dev": "vuepress-vite dev src --clean-cache",
"docs:dev": "vuepress-vite dev src",
"docs:update-package": "pnpm dlx vp-update",
"copy-dist": "rimraf .vercel/output/static && mkdirp .vercel/output/static && cpx \"src/.vuepress/dist/**/*\" .vercel/output/static && shx ls .vercel/output/static",
"copy-dist": "rimraf .vercel/output/static && mkdirp .vercel/output/static && cpx \"src/.vuepress/dist/**/*\" .vercel/output/static && shx ls -R .vercel/output/static",
"clear": "rimraf dist && rimraf .turbo && rimraf .vercel"
}
}
2 changes: 1 addition & 1 deletion packages/proj-2-vp2-custom-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"docs:clean-dev": "vuepress-vite dev src --clean-cache",
"docs:dev": "vuepress-vite dev src",
"docs:update-package": "pnpm dlx vp-update",
"copy-dist": "rimraf .vercel/output/static && mkdirp .vercel/output/static && cpx \"src/.vuepress/dist/**/*\" .vercel/output/static && shx ls .vercel/output/static",
"copy-dist": "rimraf .vercel/output/static && mkdirp .vercel/output/static && cpx \"src/.vuepress/dist/**/*\" .vercel/output/static && shx ls -R .vercel/output/static",
"clear": "rimraf dist && rimraf .turbo && rimraf .vercel"
}
}

0 comments on commit 00d7c91

Please sign in to comment.