iot-manage-dashboard/.cnb.yml
2025-11-13 11:32:27 +08:00

54 lines
1.5 KiB
YAML

$:
# vscode 事件:专供页面中启动远程开发用
vscode:
- docker:
image: node:24
services:
- vscode
- docker
stages:
- name: init
script: npm install pnpm -g && pnpm i
main:
push:
- stages:
- name: sync to gitea
image: tencentcom/git-sync
imports: https://cnb.cool/risenstars/iot-env/-/blob/main/env.yml
settings:
target_url: https://git.risenstars.com/risenstars/iot-manage-dashboard.git
auth_type: https
username: ${GIT_USERNAME}
password: ${GIT_ACCESS_TOKEN}
web_trigger_test:
- docker:
image: node:24
volumes:
- node_modules
stages:
- name: npm -i
script: |
npm install -g pnpm
pnpm install --frozen-lockfile
pnpm run build:tdesign
web_trigger_prod:
- docker:
image: node:24
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
- name: 使用 rsync 复制文件
image: tencentcom/rsync
settings:
hosts:
- ${REMOTE_HOST}
user: ${REMOTE_USERNAME}
key: ${PRIVATE_KEY}
port: ${REMOTE_PORT}
target: /www/wwwroot/hub.risenstars.com
source: ./apps/web-tdesign/dist