kind: pipeline type: docker # 流水线名称 name: au_front_admin_cicd volumes: - name: build_dist host: path: /www/wwwroot/pc_admin_auto clone: disable: true steps: - name: clone image: alpine/git commands: - git clone --depth=1 -b develop --single-branch http://front:carlyle123@git.promocollection.com.au:11180/PromoAu/pc_shop_admin.git /drone/src when: branch: - develop event: - push # - name: npm_run_build # image: node:16.14.0 # volumes: # - name: build_dist # path: /drone/src/dist # commands: # - pwd # - echo "master branch web hook" # when: # branch: # - master # event: # - push - name: npm_run_build image: node:20.14.0-slim volumes: - name: build_dist path: /drone/src/build commands: # - npm --registry=https://registry.npmmirror.com i - npm i --no-audit - npm run build-test - rm -rf ./build/* - cp -arf ./dist/* ./build - ls build - ls dist when: branch: - develop event: - push