ci
This commit is contained in:
parent
3bb5d23f70
commit
d8e6a8d55f
38
.drone.yml
38
.drone.yml
|
@ -3,29 +3,37 @@ kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: backset.cn deploy
|
name: backset.cn deploy
|
||||||
|
|
||||||
|
# 宿主机目录
|
||||||
|
volumes:
|
||||||
|
- name: node_modules
|
||||||
|
host:
|
||||||
|
path: /home/drone/cache/node_modules
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 构建
|
- name: 构建
|
||||||
image: node:16.19-alpine
|
image: node:16.19-alpine
|
||||||
# 容器内目录挂载到宿主机,仓库需要trusted权限,例如node_modules防止重复下载
|
# 容器内挂载点
|
||||||
volumes:
|
volumes:
|
||||||
- name: dist-web
|
- name: node_modules-web
|
||||||
path: /apps/web/dist
|
path: /node_modules
|
||||||
commands:
|
commands:
|
||||||
|
- pwd
|
||||||
- node -v
|
- node -v
|
||||||
- npm -v
|
- npm -v
|
||||||
- npm install -g pnpm
|
- npm install -g pnpm
|
||||||
- pnpm i
|
- pnpm i
|
||||||
- pnpm build:web
|
- pnpm build:web
|
||||||
- ls
|
when:
|
||||||
- pwd
|
event: tag
|
||||||
- cd /apps/web/dist
|
|
||||||
- ls
|
|
||||||
- cd /www
|
|
||||||
- ls
|
|
||||||
|
|
||||||
|
- name: 部署
|
||||||
# 宿主机目录
|
image: appleboy/drone-scp
|
||||||
volumes:
|
settings:
|
||||||
- name: dist-web
|
host: mozzie.cn
|
||||||
host:
|
username: root
|
||||||
path: /www/wwwroot/nginx/html/backset.cn
|
password: cr654654.
|
||||||
|
port: 22
|
||||||
|
target: /www/wwwroot/nginx/html/backset.cn/
|
||||||
|
source: ./dist/*
|
||||||
|
when:
|
||||||
|
event: tag
|
Loading…
Reference in New Issue
Block a user