Skip to content

Commit 6dbb9c8

Browse files
committed
docs: creating sphinx documentation
1 parent 45c81eb commit 6dbb9c8

23 files changed

+687
-3
lines changed

.github/workflows/sphinx.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: sphinx
2+
3+
on:
4+
push:
5+
branches: [master]
6+
paths:
7+
- 'src/**'
8+
- 'docs/**'
9+
workflow_dispatch:
10+
11+
permissions:
12+
pages: write
13+
id-token: write
14+
contents: write
15+
16+
jobs:
17+
build-docs:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Python 3.13
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.13"
26+
27+
- name: Install PIP
28+
run: pip install --root-user-action=ignore --upgrade pip
29+
30+
- name: Install project dependencies for docs using pip # Use uv and dev dependencies
31+
run: pip install sphinx furo
32+
33+
- name: Build Docs # Use your makefile to build docs
34+
run: make docs # This will execute 'make docs' in your root directory
35+
36+
- name: Prepare Deployment Directory
37+
run: |
38+
mkdir -p deploy_output/docs # Create deploy_output and docs subdirectory in one go
39+
cp docs/_static/landing.html deploy_output/index.html # Copy landing.html to staging root as index.html
40+
cp -r docs/_build/html/* deploy_output/docs # Copy ALL Sphinx output to staging/docs
41+
42+
- name: Deploy to GitHub Pages # Using peaceiris/actions-gh-pages - a popular action
43+
uses: peaceiris/actions-gh-pages@v3
44+
if: github.ref == 'refs/heads/master'
45+
with:
46+
github_token: ${{ secrets.GITHUB_TOKEN }}
47+
publish_dir: ./deploy_output # Publish the staging directory

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/source/_static/logo-dark.svg

Lines changed: 5 additions & 0 deletions
Loading

docs/source/_static/logo-light.svg

Lines changed: 5 additions & 0 deletions
Loading

docs/source/api/agents.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Agents API
2+
=========
3+
4+
.. automodule:: agentle.agents
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/source/api/generations.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Generations API
2+
==============
3+
4+
.. automodule:: agentle.generations
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/source/api/guardrails.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Guardrails API
2+
=============
3+
4+
.. automodule:: agentle.guardrails
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/source/api/index.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
API Reference
2+
============
3+
4+
This section contains detailed API documentation for Agentle.
5+
6+
.. toctree::
7+
:maxdepth: 2
8+
9+
agents
10+
rag
11+
stt
12+
tts
13+
guardrails
14+
prompts
15+
mcp
16+
generations

docs/source/api/mcp.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
MCP API
2+
=======
3+
4+
.. automodule:: agentle.mcp
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

0 commit comments

Comments
 (0)