diff --git a/.cnb.yml b/.cnb.yml index 823b28b7..867025c4 100644 --- a/.cnb.yml +++ b/.cnb.yml @@ -8,4 +8,48 @@ $: - docker stages: - name: init - script: npm install pnpm -g && pnpm i && pnpm run dev:tdesign \ No newline at end of file + script: npm install pnpm -g && pnpm i + $: +main: + web_trigger_test: + - docker: + image: node:22 + imports: https://cnb.cool/risenstars/iot-env/-/blob/main/env.yml + stages: + - name: npm install + script: | + npm install -g pnpm + pnpm install --no-frozen-lockfile + pnpm run build:tdesign:pre + + - name: 使用 rsync 复制文件 + image: tencentcom/rsync + settings: + hosts: + - ${REMOTE_HOST} + user: ${REMOTE_USERNAME} + key: ${PRIVATE_KEY} + port: ${REMOTE_PORT} + target: /www/wwwroot/hub.risenstars.com/pre + source: ./dist + web_trigger_prod: + - docker: + image: node:22 + imports: https://cnb.cool/risenstars/iot-env/-/blob/main/env.yml + stages: + - name: npm install + script: | + npm install -g pnpm + pnpm install --no-frozen-lockfile + pnpm run build:tdesign:prod + + - name: 使用 rsync 复制文件 + image: tencentcom/rsync + settings: + hosts: + - ${REMOTE_HOST} + user: ${REMOTE_USERNAME} + key: ${PRIVATE_KEY} + port: ${REMOTE_PORT} + target: /www/wwwroot/hub.risenstars.com/prod + source: ./dist \ No newline at end of file