.drone.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. ---
  2. ##################
  3. # Build & Publish#
  4. ##################
  5. kind: pipeline
  6. name: build and publish
  7. steps:
  8. - name: build
  9. image: klakegg/hugo:alpine
  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/unbl.ink/
  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. - name: build failure notification
  44. image: parrazam/drone-ntfy:0.3-linux-amd64
  45. when:
  46. status: [failure]
  47. settings:
  48. url: https://ntfy.unbl.ink
  49. topic: drone
  50. priority: high
  51. tags:
  52. - cd
  53. - success
  54. volumes:
  55. - name: docker
  56. host:
  57. path: /var/run/docker.sock
  58. - name: hugo
  59. host:
  60. path: /tmp/cache/drone/hugo