vyos.yaml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. when:
  2. - event: manual
  3. branch: main
  4. - event: push
  5. branch: main
  6. path: '.woodpecker/vyos.yaml'
  7. steps:
  8. - name: vyos
  9. environment:
  10. PROJECT_NAME: vyos
  11. PROJECT_PRETTY_NAME: VyOS
  12. FEED_REVISION: 1
  13. image: codeberg.org/mark22k/ci:latest
  14. pull: true
  15. commands:
  16. - GIT_BRANCH="current"
  17. - GIT_URL="https://github.com/vyos/vyos-documentation.git"
  18. - . ./scripts/environment.sh
  19. # Install python tools
  20. - . ./scripts/install_doc2dash.sh
  21. - . ./scripts/install_sphinx.sh
  22. - pipx inject sphinx sphinx-notfound-page
  23. - pipx inject sphinx myst-parser
  24. - pipx inject sphinx sphinx-design
  25. - pipx inject sphinx lxml
  26. - pipx inject sphinx sphinx-rtd-theme
  27. # Build VyOS docs
  28. - . ./scripts/download_from_git.sh
  29. - cd "$BASE_DIRECTORY/vyos-documentation/docs/"
  30. - PROJECT_VERSION="current-$(git rev-parse --short HEAD)"
  31. # Apply patch
  32. # see https://github.com/sphinx-doc/sphinx/issues/13019,
  33. # https://github.com/orgs/sphinx-doc/discussions/13020,
  34. # and https://vyos.dev/T6777
  35. - sed -i 's/path = nodes\.reprunicode(path)/path = str(path)/' _ext/vyos.py
  36. - make html
  37. - doc2dash _build/html
  38. # Build icons
  39. # old style
  40. - convert -resize 16x16 _static/images/vyos-logo.png VyOS.docset/icon.png
  41. - convert -resize 32x32 _static/images/vyos-logo.png VyOS.docset/icon@2x.png
  42. # new style
  43. # - magick _static/images/vyos-logo.png -resize 16x16 VyOS.docset/icon.png
  44. # - magick _static/images/vyos-logo.png -resize 32x32 VyOS.docset/icon@2x.png
  45. # Build tgz
  46. - tar czf "$BASE_DIRECTORY/VyOS.docset.tgz" VyOS.docset
  47. - cd "$FEED_DIRECTORY"
  48. - . ./scripts/create_feed.sh
  49. - . ./scripts/publish.sh
  50. secrets:
  51. - codeberg_git_username
  52. - codeberg_git_password