kind: pipeline name: default trigger: branch: - dashboard-screen steps: - name: build image: node:14 commands: - npm config set registry http://registry.npm.taobao.org - npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/ - npm config set electron_mirror https://npm.taobao.org/mirrors/electron/ - npm i - npm run build:stage - pwd - ls -la - name: removeFiles image: appleboy/drone-ssh settings: host: 172.16.0.28 username: root password: $Jgkj1234 debug: true script: - cd /www/wwwroot/railway-web.ninecase.top/release - pwd - chattr -i dist/.user.ini # - rm -rf dist - rm -rf Dockerfile - name: scp_files image: appleboy/drone-scp settings: host: 172.16.0.28 username: root password: $Jgkj1234 debug: true target: - /www/wwwroot/railway-web.ninecase.top/release - /www/wwwroot/railway-web.ninecase.top/release - /www/wwwroot/railway-web.ninecase.top/release source: - dist - nginx-conf - Dockerfile rm: true script: - ls -hl - name: deploy-build-image image: appleboy/drone-ssh settings: host: gdsc.ninecase.top username: root password: $Jgkj1234 debug: true script: - cp -r /www/wwwroot/railway-web.ninecase.top/工区DXF /www/wwwroot/railway-web.ninecase.top/release/dist/static/ - cp -r /www/wwwroot/railway-web.ninecase.top/工区所亭DXF /www/wwwroot/railway-web.ninecase.top/release/dist/static/ - cd /www/wwwroot/railway-web.ninecase.top/release - docker build -t iamsee/railway-web:1.0.0 . - docker save -o railway-web@1.0.0.tar iamsee/railway-web:1.0.0 volumes: - name: cache # The name use in this pipeline, host: path: /tmp/cache # The path be used in the host. - name: dockersock host: path: /var/run/docker.sock