.drone.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:stage
  12. - pwd
  13. - ls -la
  14. - name: removeFiles
  15. image: appleboy/drone-ssh
  16. settings:
  17. host: gdsc.ninecase.top
  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:
  35. - dist
  36. - Dockerfile
  37. rm: true
  38. - name: deploy-build-image
  39. image: appleboy/drone-ssh
  40. settings:
  41. host: gdsc.ninecase.top
  42. username: root
  43. password: $jgkj001
  44. debug: true
  45. script:
  46. - export PATH=/usr/local/bin:$PATH
  47. - echo $PATH
  48. - docker build -t iamsee/gdsc-web:1.0.0 .
  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