Skip to content

Commit 41917b6

Browse files
NathanFlurryampagentNathaneil Flurry
authored
docs: split the docs bundle into actors, general, and integrations (#5784)
- Split docs/ into three independently synced bundles: docs/actors, docs/general (the product-agnostic docs at rivet.dev/docs), and docs/integrations. - Move twelve pages about running workloads rather than writing actors into docs/general: cli, container-runner, statuses, versions, endpoints, environment-variables, pool-configuration, runtime-modes, skill, tracing, regions (was general/edge), and the management and runner half of debugging. - Split debugging and environment-variables in two, keeping the actor inspector and RivetKit SDK halves in the actors bundle. - Flatten the actors bundle's general/ subdirectory into its docs root. - Add an Architecture page defining control plane, runner, pool, namespace, datacenter, and gateway. - Adopt the site-wide docs overview and Rivet MCP pages from the website repo, alongside the mcp example snippets they embed. - Drop four dead pages: the actors and learn index stubs the website overrides, the empty use-cases stub, and the fetch-and-websocket-handler redirect page. - Move the radically-simpler-architecture essay to the website repo. - Add the kv page to the sidebar; it had content but no navigation entry. - Replace docs-sync.yml with one workflow per bundle. Amp-Thread-ID: https://ampcode.com/threads/T-01a0d0b9-c9fd-719f-9572-e08f7f1ad1c7 Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Nathaneil Flurry <nathan@rivet.gg>
1 parent e8df018 commit 41917b6

110 files changed

Lines changed: 1016 additions & 694 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
name: Sync docs
1+
name: Sync docs (actors)
22

33
# Docs live here; rivet.dev publishes them. On merge to main this copies the
4-
# docs/ bundle into the website's vendor/actors and opens a PR there, which is also
5-
# what triggers the site rebuild.
4+
# docs/actors bundle into the website's vendor/actors and opens a PR there,
5+
# which is also what triggers the site rebuild.
66
on:
77
push:
88
branches: [main]
9-
paths: ["docs/**"]
9+
paths:
10+
- "docs/actors/**"
11+
- "examples/docs/**"
12+
- "examples/workflow-sdk/**"
13+
- "rivetkit-typescript/artifacts/**"
14+
- "rivetkit-typescript/packages/rivetkit/package.json"
1015
workflow_dispatch:
1116

1217
jobs:
@@ -17,13 +22,10 @@ jobs:
1722
- uses: rivet-dev/rivet-website/.github/actions/sync-docs@main
1823
with:
1924
product: actors
25+
source: docs/actors
2026
token: ${{ secrets.RIVET_WEBSITE_TOKEN }}
2127
extra-paths: >-
2228
examples/docs
2329
examples/workflow-sdk
24-
self-host/workers
25-
self-host/control-plane
2630
rivetkit-typescript/artifacts
2731
rivetkit-typescript/packages/rivetkit/package.json
28-
engine/artifacts/config-schema.json
29-
rivetkit-openapi/openapi.json
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Sync docs (general)
2+
3+
# The product-agnostic docs published at rivet.dev/docs. They live here rather
4+
# than in the website repo because their snippets and generated schemas are
5+
# built in this repo.
6+
on:
7+
push:
8+
branches: [main]
9+
paths:
10+
- "docs/general/**"
11+
- "examples/docs/**"
12+
- "self-host/workers/**"
13+
- "self-host/control-plane/**"
14+
- "engine/artifacts/**"
15+
- "rivetkit-openapi/**"
16+
workflow_dispatch:
17+
18+
jobs:
19+
sync:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: rivet-dev/rivet-website/.github/actions/sync-docs@main
24+
with:
25+
product: docs
26+
source: docs/general
27+
token: ${{ secrets.RIVET_WEBSITE_TOKEN }}
28+
extra-paths: >-
29+
examples/docs
30+
self-host/workers
31+
self-host/control-plane
32+
engine/artifacts/config-schema.json
33+
rivetkit-openapi/openapi.json
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Sync docs (integrations)
2+
3+
# The site-wide Integrations section at rivet.dev/integrations.
4+
on:
5+
push:
6+
branches: [main]
7+
paths:
8+
- "docs/integrations/**"
9+
- "examples/docs/**"
10+
- "examples/workflow-sdk/**"
11+
workflow_dispatch:
12+
13+
jobs:
14+
sync:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: rivet-dev/rivet-website/.github/actions/sync-docs@main
19+
with:
20+
product: integrations
21+
source: docs/integrations
22+
token: ${{ secrets.RIVET_WEBSITE_TOKEN }}
23+
extra-paths: >-
24+
examples/docs
25+
examples/workflow-sdk

‎.github/workflows/mirror-swift.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
mirror:
14-
if: github.repository == 'rivet-dev/actors'
14+
if: github.repository == 'rivet-dev/rivet'
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout

‎docs-internal/engine/inspector-protocol.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Wire-level and integration rules for the RivetKit actor inspector (WebSocket + H
88
- When updating the WebSocket inspector, also update the HTTP endpoints.
99
- When adding or modifying inspector endpoints, also update:
1010
- Relevant tests in `rivetkit-typescript/packages/rivetkit/tests/` to cover all inspector HTTP endpoints.
11-
- Docs in `website/src/metadata/skill-base-rivetkit.md` and `website/src/content/docs/actors/debugging.mdx`.
11+
- Docs in `website/src/metadata/skill-base-rivetkit.md` and `docs/actors/content/docs/debugging.mdx`.
1212

1313
## Version negotiation
1414

‎docs/CLAUDE.md‎

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,43 @@ correctly there.
88

99
## Layout
1010

11+
Three bundles live here. Each is synced to the website independently by its own
12+
workflow in `.github/workflows/docs-sync-*.yml`.
13+
1114
```
1215
docs/
13-
sidebar.json navigation for the two tabs
14-
content/
15-
docs/**.mdx -> /{product}/docs/...
16-
tutorials/**.mdx -> /{product}/tutorials/...
16+
actors/ -> /actors/docs/... and /guides/...
17+
sidebar.json
18+
content/
19+
docs/**.mdx -> /actors/docs/...
20+
learn/**.mdx -> /guides/... (re-rooted by the website)
21+
general/ -> /docs/...
22+
sidebar.json
23+
content/**.mdx -> /docs/...
24+
integrations/ -> /integrations/...
25+
sidebar.json
26+
content/
27+
docs/**.mdx -> /integrations/...
1728
```
1829

19-
The website links `docs/content` into its content collection, so **only real
20-
pages belong under `content/`**. Anything else (scripts, fixtures, notes) goes
21-
elsewhere in the repo or it will be published as a docs page.
30+
The website links each bundle's `content` into its content collection, so **only
31+
real pages belong under `content/`**. Anything else (scripts, fixtures, notes)
32+
goes elsewhere in the repo or it will be published as a docs page.
33+
34+
### Which bundle does a page belong in?
35+
36+
Ask whether the page would change if you swapped out the actor programming
37+
model. If no, it is `general`: it describes the control plane that schedules,
38+
routes, versions, and observes workloads. If yes, it is `actors`: it describes
39+
the RivetKit SDK surface you write code against.
40+
41+
`general` is flat, with no subdirectories, because `/docs/` has no tab
42+
dimension the way a product vertical does. `content/cli.mdx` renders at
43+
`/docs/cli`.
44+
45+
`integrations` covers third-party frameworks and SDKs. Its `sidebar.json` is
46+
intentionally empty: the website builds that navigation from
47+
`src/data/integrations.ts` so it can carry vendor logos and category groups.
2248

2349
## Frontmatter
2450

@@ -34,9 +60,8 @@ description: "Actors store state in memory for instant reads and writes."
3460

3561
## sidebar.json
3662

37-
Navigation for this product's Documentation and Tutorials tabs. Icons travel as
38-
Font Awesome **export names**, not objects, so this repo needs no dependency on
39-
the website's icon package.
63+
Navigation for the bundle's tabs. Icons travel as Font Awesome **export names**,
64+
not objects, so this repo needs no dependency on the website's icon package.
4065

4166
```json
4267
{
@@ -45,13 +70,19 @@ the website's icon package.
4570
{ "title": "Introduction", "href": "/actors/docs", "icon": "faSquareInfo" }
4671
]}
4772
],
48-
"tutorials": []
73+
"learn": []
4974
}
5075
```
5176

52-
- `href` is the full site path, including the product segment.
77+
- One key per content directory. `docs/actors` uses `docs` and `learn`; the other
78+
two bundles use `docs` alone.
79+
- `href` is the full site path the page renders at, so it differs per bundle:
80+
`/actors/docs/...`, `/docs/...`, `/integrations/...`. The `learn` section is the
81+
exception: author it as `/actors/learn/...` and the website re-roots it onto
82+
`/guides/...`.
5383
- Adding a page to `content/` does not add it to the nav. Add it here too.
54-
- The Self-Host tab is **not** in this file. It is generated by the website.
84+
- The Deploy and Self-Host sections are **not** in these files. They are
85+
website-owned and generated there.
5586

5687
## Code
5788

@@ -116,10 +147,15 @@ git clone https://github.com/rivet-dev/website
116147
cd rivet-website && pnpm install && pnpm dev
117148
```
118149

150+
The website resolves this repo as the sibling `../rivet`, and reads all three
151+
bundles from it.
152+
119153
`pnpm assemble` prints which checkout each product resolved to. To point at a
120154
different checkout, repoint the symlink; it is gitignored and assemble leaves an
121155
existing one alone:
122156

123157
```sh
124-
ln -sfn /path/to/this/repo/docs/content src/content/docs/<product>
158+
ln -sfn /path/to/this/repo/docs/actors/content src/content/docs/actors
159+
ln -sfn /path/to/this/repo/docs/general/content src/content/docs/docs
160+
ln -sfn /path/to/this/repo/docs/integrations/content src/content/docs/integrations
125161
```
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ skill: true
66

77
Actions are very lightweight. They can be called thousands of times per second safely. Actions are executed via HTTP requests or via WebSockets if [using `.connect()`](/actors/docs/connections).
88

9-
For advanced use cases that require direct access to HTTP requests or WebSocket connections, see [raw HTTP and WebSocket handling](/actors/docs/fetch-and-websocket-handler).
9+
For advanced use cases that require direct access to HTTP requests or WebSocket connections, see [Low-Level HTTP Handler](/actors/docs/request-handler) and [Low-Level WebSocket Handler](/actors/docs/websocket-handler).
1010

1111
By default, actions run in parallel. If you need advanced control over concurrency, use [queues](/actors/docs/queues).
1212

docs/content/docs/general/actor-configuration.mdx renamed to docs/actors/content/docs/actor-configuration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import ActorConfigSchema from "@/components/docs/ActorConfigSchemaClient.astro";
1818

1919
## Related
2020

21-
- [Registry Configuration](/actors/docs/general/registry-configuration): Configure the RivetKit registry
21+
- [Registry Configuration](/actors/docs/registry-configuration): Configure the RivetKit registry
2222
- [State](/actors/docs/state): Managing actor state
2323
- [Actions](/actors/docs/actions): Defining actor actions
2424
- [Lifecycle](/actors/docs/lifecycle): Actor lifecycle hooks
File renamed without changes.

0 commit comments

Comments
 (0)