.drone.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ---
  2. ##################
  3. # Build & Publish#
  4. ##################
  5. kind: pipeline
  6. name: build and publish
  7. steps:
  8. - name: build
  9. image: hugomods/hugo
  10. commands:
  11. - hugo -d /tmp/.build/public
  12. volumes:
  13. - name: hugo
  14. path: /tmp/.build/public
  15. - name: publish
  16. image: drillster/drone-rsync
  17. settings:
  18. user: root
  19. delete: true
  20. recursive: true
  21. args: "-v"
  22. key:
  23. from_secret: unbl_ink_key
  24. hosts:
  25. - box.unbl.ink
  26. source: /tmp/.build/public/
  27. target: /home/user-data/www/onec.me/
  28. secrets: [ key ]
  29. volumes:
  30. - name: hugo
  31. path: /tmp/.build/public
  32. - name: build success notification
  33. image: parrazam/drone-ntfy:0.3-linux-amd64
  34. when:
  35. status: [success]
  36. settings:
  37. url: https://ntfy.unbl.ink
  38. topic: drone
  39. priority: low
  40. tags:
  41. - cd
  42. - failure
  43. - onecme_web
  44. - name: build failure notification
  45. image: parrazam/drone-ntfy:0.3-linux-amd64
  46. when:
  47. status: [failure]
  48. settings:
  49. url: https://ntfy.unbl.ink
  50. topic: drone
  51. priority: high
  52. tags:
  53. - cd
  54. - success
  55. - onecme_web
  56. volumes:
  57. - name: docker
  58. host:
  59. path: /var/run/docker.sock
  60. - name: hugo
  61. host:
  62. path: /tmp/cache/drone/hugo