From cca91ce48e3bce763c1c9942efeeac83334d0410 Mon Sep 17 00:00:00 2001 From: mozzie Date: Thu, 23 Mar 2023 14:00:03 +0800 Subject: [PATCH] =?UTF-8?q?cd:=20=E4=BF=AE=E6=94=B9drone=20build=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 71 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 28 deletions(-) diff --git a/.drone.yml b/.drone.yml index 939e0c5..394d876 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,7 +1,49 @@ --- kind: pipeline type: docker -name: admin & web 资源发布 +name: admin 资源发布 + +volumes: + - name: node_modules + host: + path: /home/drone/cache/node_modules + +steps: + # admin管理 + - name: build-admin + image: node:16.19-alpine + volumes: + - name: node_modules + path: /drone/src/node_modules + commands: + - pwd + - node -v + - npm -v + - npm install -g pnpm + - pnpm i + - pnpm build:admin + + - name: deploy-admin + image: appleboy/drone-scp:1.6 + settings: + host: + - backset.cn + username: root + password: cr654654. + port: 22 + overwrite: true + command_timeout: 2m + target: /www/wwwroot/nginx/html/backset.cn/ + source: ./apps/admin/dist/* + +trigger: + branch: + - release/** + +--- +kind: pipeline +type: docker +name: web 资源发布 volumes: - name: node_modules @@ -37,33 +79,6 @@ steps: target: /www/wwwroot/nginx/html/backset.cn/ source: ./apps/web/dist/* - # admin管理 - - name: build-admin - image: node:16.19-alpine - volumes: - - name: node_modules - path: /drone/src/node_modules - commands: - - pwd - - node -v - - npm -v - - npm install -g pnpm - - pnpm i - - pnpm build:admin - - - name: deploy-admin - image: appleboy/drone-scp:1.6 - settings: - host: - - backset.cn - username: root - password: cr654654. - port: 22 - overwrite: true - command_timeout: 2m - target: /www/wwwroot/nginx/html/backset.cn/ - source: ./apps/admin/dist/* - trigger: branch: - release/**