.drone_prod.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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:prod
  12. - pwd
  13. - ls -la
  14. - name: removeFiles
  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/gdscys.svstrong.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: 182.92.65.152
  30. port: 27082
  31. username: root
  32. password: Swsc2021!bd
  33. debug: true
  34. target: /www/wwwroot/gdscys.svstrong.com/release
  35. source: dist
  36. rm: true
  37. - name: deploy
  38. image: appleboy/drone-ssh
  39. settings:
  40. host: 182.92.65.152
  41. port: 27082
  42. username: root
  43. password: Swsc2021!bd
  44. debug: true
  45. script:
  46. - export PATH=/usr/local/bin:$PATH
  47. - echo $PATH
  48. volumes:
  49. - name: cache # The name use in this pipeline,
  50. host:
  51. path: /tmp/cache # The path be used in the host.
  52. - name: dockersock
  53. host:
  54. path: /var/run/docker.sock