1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- when:
- - event: manual
- branch: main
- - event: push
- branch: main
- path: '.woodpecker/meshtastic.yaml'
- steps:
- - name: meshtastic
- environment:
- PROJECT_NAME: meshtastic
- PROJECT_PRETTY_NAME: meshtastic
- FEED_REVISION: 2
- CODEBERG_GIT_USERNAME:
- from_secret: codeberg_git_username
- CODEBERG_GIT_PASSWORD:
- from_secret: codeberg_git_password
- image: codeberg.org/mark22k/ci:latest
- pull: true
- commands:
- - GIT_BRANCH="master"
- - GIT_URL="https://github.com/meshtastic/meshtastic.git"
- - . ./scripts/environment.sh
- # Install python tools
- - . ./scripts/install_dashing.sh
- # Build meshtastic docs
- - . ./scripts/download_from_git.sh
- - . ./scripts/prepare_docs_directory.sh
- - cd "$BASE_DIRECTORY/meshtastic/"
- - |
- sed -i 's|baseUrl: "/",|baseUrl: "/meshtastic/index.html",|' docusaurus.config.js
- - . /root/.shrc
- - pnpm install
- - pnpm run build
- - cd build
- - PROJECT_VERSION="meshtastic-$(git rev-parse --short HEAD)"
- - cp -r * "$DOCS_DIRECTORY"
- - |
- cat << EOF > "$DOCS_DIRECTORY/dashing.json"
- {
- "name": "meshtastic",
- "package": "meshtastic",
- "index": "index.html",
- "selectors": {
- "h1": "Guide",
- "h2": "Section"
- },
- "allowJS": true
- }
- EOF
- - cd "$FEED_DIRECTORY"
- - . ./scripts/build_dashing.sh
- # Build icons
- # old style
- - convert -resize 16x16 "$DOCS_DIRECTORY/design/logo/logo.svg" "$DOCS_DIRECTORY/meshtastic.docset/icon.png"
- - convert -resize 32x32 "$DOCS_DIRECTORY/design/logo/logo.svg" "$DOCS_DIRECTORY/meshtastic.docset/icon@2x.png"
- # new style
- # - magick _static/images/meshtastic-logo.png -resize 16x16 meshtastic.docset/icon.png
- # - magick _static/images/meshtastic-logo.png -resize 32x32 meshtastic.docset/icon@2x.png
- # Build tgz
- - . ./scripts/create_docs_tarball.sh
- - . ./scripts/create_feed.sh
- - . ./scripts/publish.sh
|