.drone_prod.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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: scp_files
  15. image: appleboy/drone-scp
  16. settings:
  17. host: 182.92.65.152
  18. port: 27082
  19. username: root
  20. password: Swsc2021!bd
  21. debug: true
  22. target: /www/wwwroot/gdscys.svstrong.com/release
  23. source: dist
  24. rm: true
  25. - name: deploy
  26. image: appleboy/drone-ssh
  27. settings:
  28. host: 182.92.65.152
  29. port: 27082
  30. username: root
  31. password: Swsc2021!bd
  32. debug: true
  33. script:
  34. - export PATH=/usr/local/bin:$PATH
  35. - echo $PATH
  36. volumes:
  37. - name: cache # The name use in this pipeline,
  38. host:
  39. path: /tmp/cache # The path be used in the host.
  40. - name: dockersock
  41. host:
  42. path: /var/run/docker.sock