Skip to content

Commit 14b0ed9

Browse files
authored
Docs first draft (#9)
* first draft of docs * hardcode deploy branch to test * fix docs on main * back to branch * move docs config to dir * update action to match docs config * add docs instructions * add basic home page * add docs quickstart * docs building custom environments with * docs for `openenv` commands and utilities * docs for core module * update homepage link * add environment grid with links to hf * move docs yaml back to parent * fix gh action to match * re-fix docs location * fix action * pin docs dir in repo * another fix on docs_dir * fix autopython config for docs * update environments with existing envs * use mkdocs style tip blocks * fix warning on home page * fix discord logo in button
1 parent fb05a89 commit 14b0ed9

20 files changed

Lines changed: 1208 additions & 0 deletions

.github/workflows/docs.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- docs-first-draft
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.11'
29+
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install mkdocs-material mkdocs-include-markdown-plugin "mkdocstrings[python]" pymdown-extensions
34+
35+
- name: Setup Pages
36+
uses: actions/configure-pages@v5
37+
38+
- name: Build site
39+
run: mkdocs build --config-file docs/mkdocs.yml
40+
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: site
45+
46+
deploy:
47+
runs-on: ubuntu-latest
48+
needs: build
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4
56+

docs/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# OpenEnv docs workflow
2+
3+
Use this guide to preview and build the MkDocs site that lives under `docs/`.
4+
5+
## 1. Install dependencies
6+
7+
```bash
8+
uv venv
9+
source .venv/bin/activate
10+
uv pip install mkdocs-material mkdocs-include-markdown-plugin "mkdocstrings[python]" pymdown-extensions
11+
```
12+
13+
The packages mirror what the GitHub Pages workflow installs, so local builds match CI.
14+
15+
## 2. Run the live preview server
16+
17+
```bash
18+
mkdocs serve --config-file docs/mkdocs.yml
19+
```
20+
21+
The site is served at `http://127.0.0.1:8000/` with automatic reloads whenever files in `docs/` or `docs/mkdocs.yml` change.
22+
23+
## 3. Produce the production build
24+
25+
```bash
26+
mkdocs build --config-file docs/mkdocs.yml --clean --site-dir site
27+
```
28+
29+
This regenerates the static HTML into `site/`, matching `.github/workflows/docs.yml`. Inspect the output locally.
30+

docs/cli.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# CLI (`openenv_cli`)
2+
3+
The `openenv` CLI provides a set of commands for building, validating, and pushing environments to Hugging Face Spaces or a custom Docker registry. For an end-to-end tutorial on building environments with OpenEnv, see the [building an environment](environment-builder.md) guide.
4+
5+
## `openenv init`
6+
7+
::: openenv_cli.commands.init
8+
9+
## `openenv build`
10+
11+
::: openenv_cli.commands.build
12+
13+
## `openenv validate`
14+
15+
::: openenv_cli.commands.validate
16+
17+
## `openenv push`
18+
19+
::: openenv_cli.commands.push
20+
21+
## `openenv serve`
22+
23+
::: openenv_cli.commands.serve
24+
25+
# API Reference
26+
27+
## Entry point
28+
29+
::: openenv_cli.__main__
30+
31+
## CLI helpers
32+
33+
::: openenv_cli._cli_utils
34+
35+
## Validation utilities
36+
37+
::: openenv_cli._validation

docs/core.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Core API Reference
2+
3+
The `openenv-core` package provides the core abstractions for building and running environments. For an end-to-end tutorial on building environments with OpenEnv, see the [building an environment](environment-builder.md) guide.
4+
5+
## Core runtime (`core`)
6+
7+
### Environment server primitives
8+
9+
::: core.env_server.interfaces
10+
11+
### HTTP server utilities
12+
13+
::: core.env_server.http_server
14+
15+
### Web interface helpers
16+
17+
::: core.env_server.web_interface
18+
19+
### Client contracts
20+
21+
::: core.http_env_client
22+
23+
### Shared dataclasses
24+
25+
::: core.client_types
26+
27+
### Container providers
28+
29+
::: core.containers.runtime.providers

0 commit comments

Comments
 (0)