diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml new file mode 100644 index 00000000..b0ed28b6 --- /dev/null +++ b/.github/workflows/doc.yml @@ -0,0 +1,38 @@ +name: Documentation +on: + push: + branches: + - main +jobs: + ai_doc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: 'pip' # caching pip dependencies + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pydoc-markdown + - name: Generate documentation and examples + run: | + pydoc-markdown -I src -p reachy_mini --render-toc > doc.md + VERSION=$(grep '^version =' pyproject.toml | head -n1 | cut -d'"' -f2) + DATE=$(date -u +'%Y-%m-%d %H:%M UTC') + echo -e "# Reachy Mini Documentation\n\n**Version:** $VERSION\n**Generated:** $DATE\n" > doc_reachy_mini_full.md + cat README.md doc.md $(find docs -type f -name '*.md' | sort) >> doc_reachy_mini_full.md + echo -e "\n# Examples\n" >> doc_reachy_mini_full.md + for f in $(find examples -type f -name '*.py' | sort); do + echo -e "\n## $(basename "$f")\n" >> doc_reachy_mini_full.md + cat "$f" >> doc_reachy_mini_full.md + done + - name: Install GitHub CLI + run: sudo apt-get update && sudo apt-get install -y gh + - name: Upload doc_reachy_mini_full.md to Gist + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + run: | + gh gist edit 919e1d7468fb16e70dbe984bdc277bba doc_reachy_mini_full.md --desc "Reachy Mini documentation and examples" diff --git a/README.md b/README.md index 1303583c..0b68dc72 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Reachy Mini +[![Ask on HuggingChat](https://img.shields.io/badge/Ask_on-HuggingChat-yellow?logo=huggingface&logoColor=yellow&style=for-the-badge)](https://huggingface.co/chat/?attachments=https%3A%2F%2Fgist.githubusercontent.com%2FFabienDanieau%2F919e1d7468fb16e70dbe984bdc277bba%2Fraw%2Fdoc_reachy_mini_full.md&prompt=Read%20this%20documentation%20about%20Reachy%20Mini%20so%20I%20can%20ask%20questions%20about%20it.) + > ⚠️ Reachy Mini is still in beta. Expect bugs, some of them we won't fix right away if they are not a priority. [Reachy Mini](https://www.pollen-robotics.com/reachy-mini/) is an expressive, open-source robot designed for human-robot interaction, creative coding, and AI experimentation. We made it to be affordable, easy to use, hackable and cute, so that you can focus on building cool AI applications!