Merge pull request 'clay : ci/cd' (#3) from master into dev
Reviewed-on: http://git.feashow.cn/feashow/bwc_web/pulls/3
This commit is contained in:
41
.drone.yml
Normal file
41
.drone.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: train_front
|
||||
steps:
|
||||
- name: build-vue
|
||||
image: node:14.20
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /drone/src/node_modules
|
||||
- name: build
|
||||
path: /app/build
|
||||
commands:
|
||||
- npm -v
|
||||
- mkdir -p ./node_modules
|
||||
- export NODE_MODULES_PATH=`pwd`/node_modules
|
||||
- set NODE_OPTIONS=--openssl-legacy-provider
|
||||
- npm install --registry=https://registry.npm.taobao.org
|
||||
- npm run build:pro
|
||||
- rm -rf /app/build/$DRONE_COMMIT_BRANCH/dist
|
||||
- cp -r dist /app/build/$DRONE_COMMIT_BRANCH/dist
|
||||
- chmod 777 /app/build/$DRONE_COMMIT_BRANCH/dist
|
||||
when:
|
||||
branch:
|
||||
- dev
|
||||
- pro
|
||||
|
||||
|
||||
|
||||
volumes:
|
||||
- name: build
|
||||
host:
|
||||
path: /www/wwwroot/bwc/bwc_web
|
||||
- name: cache
|
||||
host:
|
||||
path: /home/cache
|
||||
trigger:
|
||||
branch:
|
||||
- pro
|
||||
- dev
|
||||
event:
|
||||
- push
|
||||
Reference in New Issue
Block a user