.drone_prod.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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: 182.92.65.152
  18. port: 27082
  19. username: root
  20. password: Swsc2021!bd
  21. debug: true
  22. script:
  23. - cd /www/wwwroot/gdscys.svstrong.com/release
  24. - pwd
  25. - chattr -i dist/.user.ini
  26. - rm -rf dist
  27. - name: scp_files
  28. image: appleboy/drone-scp
  29. settings:
  30. host: 182.92.65.152
  31. port: 27082
  32. username: root
  33. password: Swsc2021!bd
  34. debug: true
  35. target: /www/wwwroot/gdscys.svstrong.com/release
  36. source: dist
  37. rm: true
  38. - name: deploy
  39. image: appleboy/drone-ssh
  40. settings:
  41. host: 182.92.65.152
  42. port: 27082
  43. username: root
  44. password: Swsc2021!bd
  45. debug: true
  46. script:
  47. - export PATH=/usr/local/bin:$PATH
  48. - echo $PATH
  49. volumes:
  50. - name: cache # The name use in this pipeline,
  51. host:
  52. path: /tmp/cache # The path be used in the host.
  53. - name: dockersock
  54. host:
  55. path: /var/run/docker.sock