add llms.txt #2
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
| # Deploy Sphinx docs to GitHub Pages using the builddocs helper. | |
| name: Deploy docs to Pages | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libssl-dev pkg-config | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "latest" | |
| - name: Sync docs environment | |
| working-directory: docs | |
| env: | |
| UV_SYSTEM_RESOLVE: "0" | |
| run: uv sync --project . | |
| - name: Install ontoenv into docs venv | |
| working-directory: docs | |
| env: | |
| UV_SYSTEM_RESOLVE: "0" | |
| run: uv pip install --project . -e ../python | |
| - name: Build Sphinx HTML | |
| working-directory: docs | |
| env: | |
| UV_SYSTEM_RESOLVE: "0" | |
| run: uv run --project . sphinx-build -M html . _build | |
| - name: Build llms.txt | |
| working-directory: docs | |
| env: | |
| UV_SYSTEM_RESOLVE: "0" | |
| run: | | |
| uv run --project . sphinx-build -M text . _build | |
| find _build/text -name '*.txt' -print | sort | xargs -r cat > _build/llms.txt | |
| cp _build/llms.txt _build/html/llms.txt | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/_build/html | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |