i2pd.yaml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. when:
  2. - event: manual
  3. branch: main
  4. - event: push
  5. branch: main
  6. path: '.woodpecker/i2pd.yaml'
  7. steps:
  8. - name: i2pd
  9. environment:
  10. PROJECT_NAME: i2pd
  11. PROJECT_PRETTY_NAME: i2pd
  12. FEED_REVISION: 1
  13. image: codeberg.org/mark22k/ci:latest
  14. pull: true
  15. commands:
  16. - GIT_BRANCH="master"
  17. - GIT_URL="https://github.com/PurpleI2P/i2pd_docs_en.git"
  18. - . ./scripts/environment.sh
  19. # Install python tools
  20. - . ./scripts/install_dashing.sh
  21. - . ./scripts/install_mkdocs.sh
  22. # Build i2pd docs
  23. - . ./scripts/download_from_git.sh
  24. - cd "$BASE_DIRECTORY/i2pd_docs_en/"
  25. - PROJECT_VERSION="master-$(git rev-parse --short HEAD)"
  26. - mkdocs build
  27. - rm site/404.html
  28. - cp -r "site/"* "$DOCS_DIRECTORY"
  29. - |
  30. cat << EOF > "$DOCS_DIRECTORY/dashing.json"
  31. {
  32. "name": "i2pd",
  33. "package": "i2pd",
  34. "index": "index.html",
  35. "selectors": {
  36. "h1": "Guide",
  37. "h2": "Section"
  38. },
  39. "allowJS": false
  40. }
  41. EOF
  42. - cd "$FEED_DIRECTORY"
  43. - . ./scripts/build_dashing.sh
  44. - sqlite3 "$DOCS_DIRECTORY/i2pd.docset/Contents/Resources/docSet.dsidx" "UPDATE searchIndex SET name = SUBSTR(name, 1, LENGTH(name) - 1) WHERE name LIKE '%¶';"
  45. # Build icons
  46. # old style
  47. - convert -resize 16x16 "$BASE_DIRECTORY/img/logo.png" i2pd.docset/icon.png
  48. - convert -resize 32x32 "$BASE_DIRECTORY/img/logo.png" i2pd.docset/icon@2x.png
  49. # new style
  50. # - magick _static/images/i2pd-logo.png -resize 16x16 i2pd.docset/icon.png
  51. # - magick _static/images/i2pd-logo.png -resize 32x32 i2pd.docset/icon@2x.png
  52. # Build tgz
  53. - . ./scripts/create_docs_tarball.sh
  54. - . ./scripts/create_feed.sh
  55. - . ./scripts/publish.sh
  56. secrets:
  57. - codeberg_git_username
  58. - codeberg_git_password