.drone.yml 1.3 KB

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