vyos.yaml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. - make html
  32. - doc2dash _build/html
  33. # Build icons
  34. # old style
  35. - convert -resize 16x16 _static/images/vyos-logo.png VyOS.docset/icon.png
  36. - convert -resize 32x32 _static/images/vyos-logo.png VyOS.docset/icon@2x.png
  37. # new style
  38. # - magick _static/images/vyos-logo.png -resize 16x16 VyOS.docset/icon.png
  39. # - magick _static/images/vyos-logo.png -resize 32x32 VyOS.docset/icon@2x.png
  40. # Build tgz
  41. - tar czf "$BASE_DIRECTORY/VyOS.docset.tgz" VyOS.docset
  42. - cd "$FEED_DIRECTORY"
  43. - . ./scripts/create_feed.sh
  44. - . ./scripts/publish.sh
  45. secrets:
  46. - codeberg_git_username
  47. - codeberg_git_password