i2pd.yaml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. - . ./scripts/prepare_docs_directory.sh
  25. - cd "$BASE_DIRECTORY/i2pd_docs_en/"
  26. - PROJECT_VERSION="master-$(git rev-parse --short HEAD)"
  27. - mkdocs build
  28. - rm site/404.html
  29. - cp -r "site/"* "$DOCS_DIRECTORY"
  30. - |
  31. cat << EOF > "$DOCS_DIRECTORY/dashing.json"
  32. {
  33. "name": "i2pd",
  34. "package": "i2pd",
  35. "index": "index.html",
  36. "selectors": {
  37. "h1": "Guide",
  38. "h2": "Section"
  39. },
  40. "allowJS": false
  41. }
  42. EOF
  43. - cd "$FEED_DIRECTORY"
  44. - . ./scripts/build_dashing.sh
  45. - sqlite3 "$DOCS_DIRECTORY/i2pd.docset/Contents/Resources/docSet.dsidx" "UPDATE searchIndex SET name = SUBSTR(name, 1, LENGTH(name) - 1) WHERE name LIKE '%¶';"
  46. # Build icons
  47. # old style
  48. - convert -resize 16x16 "$DOCS_DIRECTORY/img/logo.png" "$DOCS_DIRECTORY/i2pd.docset/icon.png"
  49. - convert -resize 32x32 "$DOCS_DIRECTORY/img/logo.png" "$DOCS_DIRECTORY/i2pd.docset/icon@2x.png"
  50. # new style
  51. # - magick _static/images/i2pd-logo.png -resize 16x16 i2pd.docset/icon.png
  52. # - magick _static/images/i2pd-logo.png -resize 32x32 i2pd.docset/icon@2x.png
  53. # Build tgz
  54. - . ./scripts/create_docs_tarball.sh
  55. - . ./scripts/create_feed.sh
  56. - . ./scripts/publish.sh
  57. secrets:
  58. - codeberg_git_username
  59. - codeberg_git_password