.drone.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. kind: pipeline
  2. name: default
  3. steps:
  4. - name: build
  5. image: node:14
  6. # volumes:
  7. # - name: cache # The Volume's name
  8. # path: ./node_modules # The path in the container
  9. # environment:
  10. # NODE_ENV: product
  11. commands:
  12. - npm config set registry http://registry.npm.taobao.org
  13. - npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
  14. - npm config set electron_mirror https://npm.taobao.org/mirrors/electron/
  15. - npm i
  16. - npm run build
  17. - pwd
  18. - ls -la
  19. - name: scp_files
  20. image: appleboy/drone-scp
  21. settings:
  22. host: 172.17.0.1
  23. username: root
  24. password: $jgkj001
  25. debug: true
  26. target: /www/wwwroot/railway-web.iamsee.com/release
  27. source: dist
  28. rm: true
  29. - name: deploy
  30. image: appleboy/drone-ssh
  31. settings:
  32. host: deploy.iamsee.com
  33. username: root
  34. password: $jgkj001
  35. debug: true
  36. script:
  37. - export PATH=/usr/local/bin:$PATH
  38. - echo $PATH
  39. volumes:
  40. - name: cache # The name use in this pipeline,
  41. host:
  42. path: /tmp/cache # The path be used in the host.
  43. - name: dockersock
  44. host:
  45. path: /var/run/docker.sock