Skip to content

Docs import - Update GitHub-related files #2949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Check Link Validity in Documentation
name: Docs - Check Link Validity

on:
pull_request:
branches:
- master
push:
branches:
- master
Expand All @@ -22,9 +20,11 @@ jobs:
node-version: '16' # or the version of Node.js you're using

- name: Install dependencies
working-directory: docs
run: |
npm install

- name: Run link check
working-directory: docs
run: |
npm run check-links
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Validate nav.ts Matches nav.js
name: Docs - Validate nav.ts Matches nav.js

on:
pull_request:
branches:
- master
push:
branches:
- master
Expand All @@ -23,22 +21,27 @@ jobs:
node-version: '16'

- name: Install dependencies
working-directory: docs
run: |
npm install

- name: Backup existing nav.js
working-directory: docs
run: |
mv docs/nav.js docs/nav.js.original

- name: Build nav.ts
working-directory: docs
run: |
npm run build

- name: Compare generated nav.js with original nav.js
working-directory: docs
run: |
diff -q docs/nav.js docs/nav.js.original || (echo "Generated nav.js differs from committed version. Run 'npm run build' and commit the updated file." && exit 1)

- name: Restore original nav.js
working-directory: docs
if: success() || failure()
run: |
mv docs/nav.js.original docs/nav.js
12 changes: 3 additions & 9 deletions .github/workflows/pr-only-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,12 @@ jobs:
with:
ref: ${{ env.GIT_REF }}
- uses: dsherret/rust-toolchain-file@v1
- name: Checkout docs
uses: actions/checkout@v4
with:
repository: clockworklabs/spacetime-docs
ref: master
path: spacetime-docs
- name: Check for docs change
run: |
cargo run --features markdown-docs -p spacetimedb-cli > spacetime-docs/docs/cli-reference.md
cd spacetime-docs
cargo run --features markdown-docs -p spacetimedb-cli > docs/docs/cli-reference.md
cd docs
# This is needed because our website doesn't render markdown quite properly.
# See the README in spacetime-docs for more details.
# See the README in docs for more details.
sed -i'' -E 's!^(##) `(.*)`$!\1 \2!' docs/cli-reference.md
sed -i'' -E 's!^(######) \*\*(.*)\*\*$!\1 <b>\2</b>!' docs/cli-reference.md
git status
Expand Down
52 changes: 0 additions & 52 deletions docs/.github/workflows/check-cli-reference.yml

This file was deleted.

7 changes: 5 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## Migration note
We are in the process of moving from the `spacetimedb-docs` repo to the `docs` subdirectory of [SpacetimeDB](https://github.com/clockworklabs/SpacetimeDB). **Any new changes should be made there**. The `spacetimedb-docs` repo will only be updated on release. Apologies in advance for any sharp edges while the migration is in progress.

## SpacetimeDB Documentation

This repository contains the markdown files which are used to display documentation on our [website](https://spacetimedb.com/docs).
Expand All @@ -10,7 +13,8 @@ To make changes to our docs, you can open a pull request in this repository. You
2. Clone your fork:

```bash
git clone ssh://git@github.com/<username>/spacetime-docs
git clone ssh://git@github.com/<username>/SpacetimeDB
cd SpacetimeDB/docs
```

3. Make your edits to the docs that you want to make + test them locally
Expand All @@ -33,7 +37,6 @@ git push -u origin a-branch-name-that-describes-my-change
> NOTE! If you make a change to `nav.ts` you will have to run `npm run build` to generate a new `docs/nav.js` file.

#### CLI Reference Section
1. Make sure that https://github.com/clockworklabs/SpacetimeDB/pull/2276 is included in your `spacetimedb-cli` binary
1. Run `cargo run --features markdown-docs -p spacetimedb-cli > cli-reference.md`

We currently don't properly render markdown backticks and bolding that are inside of headers, so do these two manual replacements to make them look okay (these have only been tested on Linux):
Expand Down
Loading