Skip to content

Commit 68ec9e7

Browse files
authored
ci: deploy docs to GitHub Pages on push to main (#29)
* docs: deploy to GitHub Pages on push to main Wires up automated docs publishing now that the source tree is on MkDocs Material. Build runs on every push to `main` and uploads the `site/` directory as a Pages artifact; the deploy job ships it to `https://redis-developer.github.io/sql-redis/`. Workflow (`.github/workflows/docs.yml`): - Uses the same uv + Python 3.11 toolchain as `test.yml` and `lint.yml` for consistency. - `fetch-depth: 0` so `mkdocs-git-revision-date-localized-plugin` can walk full history when computing per-page modification dates. - Builds with `--strict` so broken links or missing references fail the workflow before deploy runs. - Deploys via `actions/deploy-pages@v4` (no `gh-pages` branch; uses the modern Pages "GitHub Actions" source). - `concurrency: pages` with `cancel-in-progress: false` so concurrent pushes do not interrupt an in-flight deploy. Config: - `mkdocs.yml`: `site_url` -> `https://redis-developer.github.io/sql-redis/` so canonical links and the auto-generated `llms.txt` point at the live host. - `README.md`: replace the "docs site not yet live" callout with a direct link to the GitHub Pages URL; update the `llms.txt` bullet to the live URL. - `AGENTS.md`: same URL update in the discoverable-artifacts table and the hub-context section. Pages itself was enabled on the repo with `build_type=workflow` so the first run of this workflow on `main` is the first publish. * docs(readme): drop experimental warnings, add centered Redis logo header - Remove the orange shields.io "Status: Experimental" badge and the matching blockquote callout. The Experimental tier note still lives in the docs site for context; the README no longer leads with it. - Replace the plain `# sql-redis` title with a centered hero block matching the redisvl README pattern: Redis logo (canonical SVG from `redis/redis-vl-python/docs/_static/`) + `<h1>sql-redis</h1>` + one-line tagline + a Documentation / GitHub / PyPI link bar. - Surface the published docs URL prominently right after the hero so new readers land on the live site before scrolling. - Move the local docs preview command (`make docs-serve`) into the existing Development section where the other `make` targets live. * chore: remove redundant docs link
1 parent 7db408b commit 68ec9e7

4 files changed

Lines changed: 90 additions & 16 deletions

File tree

.github/workflows/docs.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Deploy docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
env:
10+
UV_VERSION: "0.7.13"
11+
PYTHON_VERSION: "3.11"
12+
DISABLE_MKDOCS_2_WARNING: "true"
13+
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
concurrency:
20+
group: pages
21+
cancel-in-progress: false
22+
23+
jobs:
24+
build:
25+
name: Build site
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Check out repository
29+
uses: actions/checkout@v6
30+
with:
31+
# Required by mkdocs-git-revision-date-localized-plugin so it can
32+
# walk the full history when computing per-page modification dates.
33+
fetch-depth: 0
34+
35+
- name: Install Python
36+
uses: actions/setup-python@v6
37+
with:
38+
python-version: ${{ env.PYTHON_VERSION }}
39+
40+
- name: Install uv
41+
uses: astral-sh/setup-uv@v6
42+
with:
43+
version: ${{ env.UV_VERSION }}
44+
enable-cache: true
45+
python-version: ${{ env.PYTHON_VERSION }}
46+
cache-dependency-glob: |
47+
pyproject.toml
48+
uv.lock
49+
50+
- name: Install docs dependencies
51+
run: uv sync --group docs
52+
53+
- name: Build site (strict)
54+
run: uv run mkdocs build --strict
55+
56+
- name: Upload Pages artifact
57+
uses: actions/upload-pages-artifact@v3
58+
with:
59+
path: site
60+
61+
deploy:
62+
name: Deploy to GitHub Pages
63+
needs: build
64+
runs-on: ubuntu-latest
65+
environment:
66+
name: github-pages
67+
url: ${{ steps.deployment.outputs.page_url }}
68+
steps:
69+
- name: Deploy
70+
id: deployment
71+
uses: actions/deploy-pages@v4

AGENTS.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Full reference, generated from docstrings, is at `docs/api/`.
9696

9797
| Artifact | Purpose |
9898
|---|---|
99-
| [`llms.txt`](https://docs.redisvl.com/projects/sql-redis/llms.txt) | Auto-generated flat index of every doc page with one-line summaries. Built by `mkdocs-llmstxt` at deploy time. Good for in-context injection. |
99+
| [`llms.txt`](https://redis-developer.github.io/sql-redis/llms.txt) | Auto-generated flat index of every doc page with one-line summaries. Built by `mkdocs-llmstxt` at deploy time. Good for in-context injection. |
100100
| [`docs/api/`](docs/api/) | mkdocstrings reference for every public symbol, generated from Google-style docstrings. Source of truth for method signatures. |
101101
| [`docs/user_guide/how_to_guides/`](docs/user_guide/how_to_guides/) | Task-oriented recipes (vector search, GEO, dates, async, parameters). |
102102
| [`docs/concepts/`](docs/concepts/) | Why-style explanation: architecture, parameter substitution, schema-aware translation. |
@@ -105,9 +105,10 @@ Full reference, generated from docstrings, is at `docs/api/`.
105105
## Hub context
106106

107107
sql-redis sits in the [Redis AI Hub](https://redis.io/ai-hub/) under the
108-
*Experimental* tier as "SQL for Redis". Public docs URL:
109-
[`docs.redisvl.com/projects/sql-redis/`](https://docs.redisvl.com/projects/sql-redis/).
110-
The hub's docs standards (Diataxis layout, docstring-driven API reference,
111-
AI-agent affordances) are documented at
108+
*Experimental* tier as "SQL for Redis". Published docs:
109+
[`redis-developer.github.io/sql-redis/`](https://redis-developer.github.io/sql-redis/)
110+
(GitHub Pages, deployed by `.github/workflows/docs.yml` on every push to
111+
`main`). The hub's docs standards (Diataxis layout, docstring-driven API
112+
reference, AI-agent affordances) are documented at
112113
[`HUB_DOCS_STANDARDS.md`](https://github.com/redis/docs/blob/main/HUB_DOCS_STANDARDS.md)
113114
in the hub repo.

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
# sql-redis
1+
<div align="center">
2+
<img width="300" src="https://raw.githubusercontent.com/redis/redis-vl-python/main/docs/_static/Redis_Logo_Red_RGB.svg" alt="Redis">
3+
<h1>sql-redis</h1>
4+
<p><strong>SQL on top of RediSearch and RedisVL indexes</strong></p>
5+
</div>
26

3-
[![Status: Experimental](https://img.shields.io/badge/status-experimental-orange)](https://redis.io/ai-hub/)
7+
<div align="center">
48

5-
A SQL-to-Redis translator that converts SQL `SELECT` statements into Redis `FT.SEARCH` and `FT.AGGREGATE` commands. Query Redis collections with familiar SQL on top of RediSearch and RedisVL indexes.
9+
**[Documentation](https://redis-developer.github.io/sql-redis/)****[GitHub](https://github.com/redis-developer/sql-redis)****[PyPI](https://pypi.org/project/sql-redis/)**
610

7-
> **Status: Experimental.** sql-redis is in the [Redis AI Hub](https://redis.io/ai-hub/) under the Experimental tier. The API can change between minor releases. Not yet production-ready; we are validating the design and the SQL surface in real use.
11+
</div>
812

9-
A Diataxis-aligned documentation site (concepts, how-to guides, API reference, examples) lives in [`docs/`](docs/) and will be published at **docs.redisvl.com/projects/sql-redis/** once the hub site is live. Until then, this README is the canonical reference. Build the site locally with:
13+
---
1014

11-
```bash
12-
uv sync --group docs
13-
make docs-serve # http://localhost:8000
14-
```
15+
A SQL-to-Redis translator that converts SQL `SELECT` statements into Redis `FT.SEARCH` and `FT.AGGREGATE` commands. Query Redis collections with familiar SQL on top of RediSearch and RedisVL indexes.
1516

1617
## Install
1718

@@ -428,7 +429,7 @@ Each layer has focused unit tests; 100% coverage is achievable because responsib
428429
## For AI agents
429430

430431
- **[`AGENTS.md`](AGENTS.md):** how to use sql-redis from an agent, including gotchas and the error model.
431-
- **`llms.txt`:** auto-generated at docs-build time (`make docs-build``site/llms.txt`). A flat index of every doc page with one-line summaries; it will live at `docs.redisvl.com/projects/sql-redis/llms.txt` once published.
432+
- **[`llms.txt`](https://redis-developer.github.io/sql-redis/llms.txt):** auto-generated flat index of every doc page with one-line summaries (built by `mkdocs-llmstxt`).
432433
- **[`docs/for-ais-only/`](docs/for-ais-only/):** repository map, build and test guide, and intentional failure modes for agents modifying the library.
433434

434435
## Development
@@ -438,6 +439,7 @@ make install # uv sync --all-extras
438439
make test # requires Docker for testcontainers
439440
make test-cov # with coverage report
440441
make lint # format + mypy
442+
make docs-serve # uv sync --group docs && preview at http://localhost:8000
441443
```
442444

443445
## Testing philosophy

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
site_name: sql-redis
22
site_description: SQL to Redis FT.SEARCH and FT.AGGREGATE translator.
3-
site_url: https://docs.redisvl.com/projects/sql-redis/
3+
site_url: https://redis-developer.github.io/sql-redis/
44
repo_url: https://github.com/redis-developer/sql-redis
55
repo_name: redis-developer/sql-redis
66
edit_uri: edit/main/docs/

0 commit comments

Comments
 (0)