diff --git a/.drone.yml b/.drone.yml index 870c453..779090f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -28,7 +28,9 @@ volumes: - name: env-files host: path: /niushuai233/env - + - name: nginx-www + host: + path: /usr/share/nginx/www # ci 步骤 steps: # node install @@ -42,41 +44,41 @@ steps: path: /node_cache - name: node-modules path: /drone/src/node_modules + - name: nginx-www + path: /dist commands: - echo 'node package start' - - ls -alh - - echo $PROD_API_URL - - sed -i "s#PROD_API_URL#$PROD_API_URL#g" .env.production - - cat .env.production # 打包 - npm config set registry https://registry.npm.taobao.org - npm config set cache /node_cache --global - npm run pre - npm run build + - mkdir -p /dist/db-bastion-vue/ + - cp -R dist/* /dist/db-bastion-vue/ - # 构建镜像 - - name: build-image - image: docker:dind - volumes: - - name: docker-sock - path: /var/run/docker.sock - commands: - - echo 'build image start' - # 构建新镜像 - - docker build -t niushuai233/db-bastion-vue:latest . - # 清理无用镜像 - - docker image prune -f --filter "dangling=true" + # # 构建镜像 + # - name: build-image + # image: docker:dind + # volumes: + # - name: docker-sock + # path: /var/run/docker.sock + # commands: + # - echo 'build image start' + # # 构建新镜像 + # - docker build -t niushuai233/db-bastion-vue:latest . + # # 清理无用镜像 + # - docker image prune -f --filter "dangling=true" - # 启动服务 - - name: deploy - image: docker:dind - volumes: - - name: docker-sock - path: /var/run/docker.sock - - name: env-files - path: /niushuai233/env - commands: - - echo 'deploy start' - - pwd - - ls -alh - - sh deploy.sh \ No newline at end of file + # # 启动服务 + # - name: deploy + # image: docker:dind + # volumes: + # - name: docker-sock + # path: /var/run/docker.sock + # - name: env-files + # path: /niushuai233/env + # commands: + # - echo 'deploy start' + # - pwd + # - ls -alh + # - sh deploy.sh \ No newline at end of file