Skip to content

Commit 6d92041

Browse files
eryajferyajf
eryajf
authored and
eryajf
committed
"feat(build): 优化构建配置并添加多阶段CI流程"
1 parent 2d19e3f commit 6d92041

File tree

2 files changed

+32
-6
lines changed

2 files changed

+32
-6
lines changed

.cnb.yml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,39 @@
11
main:
22
push:
3-
- stages:
3+
- stageOne:
4+
runner:
5+
cpus: 8
6+
services:
7+
- docker
8+
- git-clone-yyds
9+
stages:
410
- name: sync to github
511
image: tencentcom/git-sync
6-
imports: https://cnb.cool/opsre/build-env/-/blob/main/env.yaml
12+
imports: https://cnb.cool/eryajf/build-env/-/blob/main/env.yaml
713
settings:
8-
target_url: https://github.com/opsre/JenkinsGuide.git
14+
branch: main
915
auth_type: https
10-
git_email: 'github-actions[bot]@users.noreply.github.com'
1116
username: ${GIT_USERNAME}
1217
password: ${GIT_ACCESS_TOKEN}
13-
branch: main
18+
target_url: https://github.com/opsre/JenkinsGuide.git
19+
git_email: 'github-actions[bot]@users.noreply.github.com'
20+
- stageTwo:
21+
runner:
22+
cpus: 16
23+
services:
24+
- docker
25+
- git-clone-yyds
26+
docker:
27+
image: docker.cnb.cool/znb/images/node:18
28+
volumes:
29+
- /data/.cache:copy-on-write
30+
stages:
31+
- name: print node version
32+
scripts: |
33+
node -v && npm -v && yarn -v && pnpm -v
34+
- name: install dependencies
35+
scripts: |
36+
pnpm i
37+
- name: build project
38+
scripts: |
39+
pnpm build

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"scripts": {
1313
"dev": "vitepress dev docs",
14-
"build": "vitepress build docs",
14+
"build": "NODE_OPTIONS=--max-old-space-size=24576 vitepress build docs",
1515
"preview": "vitepress preview docs"
1616
},
1717
"dependencies": {

0 commit comments

Comments
 (0)