Feat/mcp interface (#260) #1129
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Publish Multi-Version Docs | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| release: | |
| types: | |
| - published | |
| pull_request: | |
| branches: | |
| - dev | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/dev' }} | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-docs: | |
| name: Build Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Cache Hugging Face | |
| id: cache-hf | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/huggingface | |
| key: docs-cache-hf | |
| - name: Install pandoc | |
| run: | | |
| sudo apt install pandoc | |
| - name: Install dependencies | |
| run: | | |
| pip install .[docs] | |
| - name: Run tests | |
| if: github.event_name != 'workflow_dispatch' | |
| run: | | |
| echo "Testing documentation build..." | |
| python -m sphinx build -b doctest docs/source docs/build/html | |
| - name: Build documentation | |
| if: ${{ github.ref == 'refs/heads/dev' }} && github.event_name != 'workflow_dispatch' | |
| run: | | |
| python -m sphinx build -b html docs/source docs/build/html | |
| - name: build multiversion documentation | |
| if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' | |
| run: | | |
| sphinx-multiversion docs/source docs/build/html | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' | |
| with: | |
| github_token: ${{ github.token }} | |
| publish_dir: docs/build/html/versions | |
| destination_dir: versions | |
| keep_files: true |