unbound.yaml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. when:
  2. - event: manual
  3. branch: main
  4. - event: push
  5. branch: main
  6. path: '.woodpecker/unbound.yaml'
  7. steps:
  8. - name: unbound
  9. environment:
  10. PROJECT_NAME: unbound
  11. PROJECT_PRETTY_NAME: Unbound
  12. FEED_REVISION: 1
  13. CODEBERG_GIT_USERNAME:
  14. from_secret: codeberg_git_username
  15. CODEBERG_GIT_PASSWORD:
  16. from_secret: codeberg_git_password
  17. image: codeberg.org/mark22k/ci:latest
  18. pull: true
  19. commands:
  20. - GIT_BRANCH="main"
  21. - GIT_URL="https://github.com/NLnetLabs/unbound-manual.git"
  22. - . ./scripts/environment.sh
  23. # Install python tools
  24. - . ./scripts/install_doc2dash.sh
  25. - . ./scripts/install_sphinx.sh
  26. - pipx inject sphinx sphinx-version-warning
  27. - pipx inject sphinx sphinx-tabs
  28. - pipx inject sphinx sphinx-copybutton
  29. - pipx inject sphinx sphinx-notfound-page
  30. - pipx inject sphinx sphinx-rtd-theme
  31. - pipx inject sphinx requests
  32. # Build Unbound docs
  33. - . ./scripts/download_from_git.sh
  34. - cd "$BASE_DIRECTORY/unbound-manual"
  35. - PROJECT_VERSION="unbound-$(git rev-parse --short HEAD)"
  36. - make html
  37. - doc2dash build/html
  38. # Build icons
  39. # old style
  40. - convert -resize 16x16 source/resources/favicon.ico[2] Unbound.docset/icon.png
  41. - convert -resize 32x32 source/resources/favicon.ico[1] Unbound.docset/icon@2x.png
  42. # new style
  43. # - magick source/resources/favicon.ico -resize 16x16 Unbound.docset/icon.png
  44. # - magick source/resources/favicon.ico -resize 32x32 Unbound.docset/icon@2x.png
  45. # Build tgz
  46. - tar czf "$BASE_DIRECTORY/Unbound.docset.tgz" Unbound.docset
  47. - cd "$FEED_DIRECTORY"
  48. - . ./scripts/create_feed.sh
  49. - . ./scripts/publish.sh