.drone.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. - git submodule update --init --recursive
  12. - hugo -d /tmp/.build/public
  13. volumes:
  14. - name: hugo
  15. path: /tmp/.build/public
  16. - name: publish
  17. image: drillster/drone-rsync
  18. settings:
  19. user: root
  20. delete: true
  21. recursive: true
  22. args: "-v"
  23. key:
  24. from_secret: unbl_ink_key
  25. hosts:
  26. - box.unbl.ink
  27. source: /tmp/.build/public/
  28. target: /home/user-data/www/onec.me/
  29. secrets: [ key ]
  30. volumes:
  31. - name: hugo
  32. path: /tmp/.build/public
  33. - name: build success notification
  34. image: parrazam/drone-ntfy:0.3-linux-amd64
  35. when:
  36. status: [success]
  37. settings:
  38. url: https://ntfy.unbl.ink
  39. topic: drone
  40. priority: low
  41. tags:
  42. - cd
  43. - failure
  44. - onecme_web
  45. - name: build failure notification
  46. image: parrazam/drone-ntfy:0.3-linux-amd64
  47. when:
  48. status: [failure]
  49. settings:
  50. url: https://ntfy.unbl.ink
  51. topic: drone
  52. priority: high
  53. tags:
  54. - cd
  55. - success
  56. - onecme_web
  57. volumes:
  58. - name: docker
  59. host:
  60. path: /var/run/docker.sock
  61. - name: hugo
  62. host:
  63. path: /tmp/cache/drone/hugo