Skip to content

Commit afb8c08

Browse files
JulienLavocatjdettercloutiertyler
authored
Docusaurus migration (#3343)
## Description of Changes - Migrate the documentation site to **Docusaurus**. - Add a **GitHub Action workflow** that runs `pnpm build` on pull requests targeting `master`. This command checks for broken links and images and ensures the site builds correctly. - Add a **GitHub Action workflow** to publish the docs automatically when a merge occurs on the `docs/release` branch. **Important**: The workflows haven't been tested yet due to the fact that they need to be merged first before being able to run. It's a fairly basic workflow I don't expect this to block anyone but anyways I will make another PR with the complete changes when I can actually run it. --- ## API and ABI Breaking Changes No breaking changes for **SpacetimeDB** users. Documentation contributors should experience minimal disruption — content is still written in Markdown. --- ## Expected Complexity Level and Risk **Complexity:** 3/5 **Reasons:** 1. Several adjustments were made to fit Docusaurus conventions: - Replaced our custom `:::server-rust` blocks with [Docusaurus `<Tabs/>` components](https://docusaurus.io/docs/markdown-features/tabs). - Converted “Note” callouts using [admonitions](https://docusaurus.io/docs/markdown-features/admonitions) instead of Markdown blockquotes. - Updated all images (including Unity tutorial ones, which were previously commented out). - Moved images from the DO bucket into the repository at `docs/static/images`. 2. Customized Docusaurus CSS and one component to apply our theme and color palette. --- ## Testing Tested locally. --- ## Review Notes This PR involves many file changes — a full code review is likely not productive. Instead, please focus on verifying that the **documentation content** was migrated correctly: - Review sections you’re familiar with to confirm accuracy. - Ensure formatting, links, and images render as expected. You can follow the updated **README** for instructions on running Docusaurus locally. --------- Signed-off-by: Julien Lavocat <JulienLavocat@users.noreply.github.com> Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com> Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com> Co-authored-by: = <cloutiertyler@gmail.com>
1 parent dcd8640 commit afb8c08

118 files changed

Lines changed: 35908 additions & 8718 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.

.github/workflows/docs-check-links.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Docs / Publish
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches:
9+
- docs/release
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '22'
22+
23+
- uses: pnpm/action-setup@v4
24+
with:
25+
run_install: true
26+
27+
- name: Get pnpm store directory
28+
working-directory: sdks/typescript
29+
shell: bash
30+
run: |
31+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
32+
33+
- uses: actions/cache@v4
34+
name: Setup pnpm cache
35+
with:
36+
path: ${{ env.STORE_PATH }}
37+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
38+
restore-keys: |
39+
${{ runner.os }}-pnpm-store-
40+
41+
- name: Install dependencies
42+
working-directory: docs
43+
run: pnpm install
44+
45+
- name: Docusaurus build
46+
working-directory: docs
47+
run: pnpm build
48+
49+
- name: Publish docs to S3
50+
uses: shallwefootball/s3-upload-action@master
51+
with:
52+
aws_key_id: ${{ secrets.DOCS_AWS_KEY_ID }}
53+
aws_secret_access_key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY}}
54+
aws_bucket: spacetimedb-docs
55+
source_dir: docs/build
56+
destination_dir: 'docs'

.github/workflows/docs-test.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Docs / Test
2+
permissions:
3+
contents: read
4+
5+
on:
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: '22'
19+
20+
- uses: pnpm/action-setup@v4
21+
with:
22+
run_install: true
23+
24+
- name: Get pnpm store directory
25+
working-directory: sdks/typescript
26+
shell: bash
27+
run: |
28+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
29+
30+
- uses: actions/cache@v4
31+
name: Setup pnpm cache
32+
with:
33+
path: ${{ env.STORE_PATH }}
34+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
35+
restore-keys: |
36+
${{ runner.os }}-pnpm-store-
37+
38+
- name: Install dependencies
39+
working-directory: docs
40+
run: pnpm install
41+
42+
- name: Docusaurus build
43+
working-directory: docs
44+
run: pnpm build

.github/workflows/docs-validate-nav-build.yml

Lines changed: 0 additions & 79 deletions
This file was deleted.

docs/.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
7+
[src/**.ts]
8+
indent_style = space
9+
indent_size = 2
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
max_line_length = 120
13+
14+
[*.json]
15+
indent_style = space
16+
indent_size = 2

docs/.github/workflows/repo-migration-notice.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

docs/.gitignore

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
1-
**/.vscode
2-
.idea
3-
*.log
4-
node_modules
5-
.DS_store
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docs/.prettierignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/LICENSE.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)