123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- when:
- - event: manual
- branch: main
- - event: push
- branch: main
- path: '.woodpecker/i2pd.yaml'
- steps:
- - name: i2pd
- environment:
- PROJECT_NAME: i2pd
- PROJECT_PRETTY_NAME: i2pd
- FEED_REVISION: 1
- image: codeberg.org/mark22k/ci:latest
- pull: true
- commands:
- - GIT_BRANCH="master"
- - GIT_URL="https://github.com/PurpleI2P/i2pd_docs_en.git"
- - . ./scripts/environment.sh
- # Install python tools
- - . ./scripts/install_dashing.sh
- - . ./scripts/install_mkdocs.sh
- # Build i2pd docs
- - . ./scripts/download_from_git.sh
- - cd "$BASE_DIRECTORY/i2pd_docs_en/"
- - PROJECT_VERSION="master-$(git rev-parse --short HEAD)"
- - mkdocs build
- - rm site/404.html
- - cp -r "site/"* "$DOCS_DIRECTORY"
- - |
- cat << EOF > "$DOCS_DIRECTORY/dashing.json"
- {
- "name": "i2pd",
- "package": "i2pd",
- "index": "index.html",
- "selectors": {
- "h1": "Guide",
- "h2": "Section"
- },
- "allowJS": false
- }
- EOF
- - cd "$FEED_DIRECTORY"
- - . ./scripts/build_dashing.sh
- - sqlite3 "$DOCS_DIRECTORY/i2pd.docset/Contents/Resources/docSet.dsidx" "UPDATE searchIndex SET name = SUBSTR(name, 1, LENGTH(name) - 1) WHERE name LIKE '%¶';"
- # Build icons
- # old style
- - convert -resize 16x16 "$BASE_DIRECTORY/img/logo.png" i2pd.docset/icon.png
- - convert -resize 32x32 "$BASE_DIRECTORY/img/logo.png" i2pd.docset/icon@2x.png
- # new style
- # - magick _static/images/i2pd-logo.png -resize 16x16 i2pd.docset/icon.png
- # - magick _static/images/i2pd-logo.png -resize 32x32 i2pd.docset/icon@2x.png
- # Build tgz
- - . ./scripts/create_docs_tarball.sh
- - . ./scripts/create_feed.sh
- - . ./scripts/publish.sh
- secrets:
- - codeberg_git_username
- - codeberg_git_password
|