Skip to content

Commit 7afa0b4

Browse files
authored
Docs import - Update GitHub-related files (#2949)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
1 parent ce328d5 commit 7afa0b4

File tree

5 files changed

+17
-69
lines changed

5 files changed

+17
-69
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
name: Check Link Validity in Documentation
1+
name: Docs - Check Link Validity
22

33
on:
44
pull_request:
5-
branches:
6-
- master
75
push:
86
branches:
97
- master
@@ -22,9 +20,11 @@ jobs:
2220
node-version: '16' # or the version of Node.js you're using
2321

2422
- name: Install dependencies
23+
working-directory: docs
2524
run: |
2625
npm install
2726
2827
- name: Run link check
28+
working-directory: docs
2929
run: |
3030
npm run check-links

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
name: Validate nav.ts Matches nav.js
1+
name: Docs - Validate nav.ts Matches nav.js
22

33
on:
44
pull_request:
5-
branches:
6-
- master
75
push:
86
branches:
97
- master
@@ -23,22 +21,27 @@ jobs:
2321
node-version: '16'
2422

2523
- name: Install dependencies
24+
working-directory: docs
2625
run: |
2726
npm install
2827
2928
- name: Backup existing nav.js
29+
working-directory: docs
3030
run: |
3131
mv docs/nav.js docs/nav.js.original
3232
3333
- name: Build nav.ts
34+
working-directory: docs
3435
run: |
3536
npm run build
3637
3738
- name: Compare generated nav.js with original nav.js
39+
working-directory: docs
3840
run: |
3941
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)
4042
4143
- name: Restore original nav.js
44+
working-directory: docs
4245
if: success() || failure()
4346
run: |
4447
mv docs/nav.js.original docs/nav.js

.github/workflows/pr-only-ci.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,12 @@ jobs:
3131
with:
3232
ref: ${{ env.GIT_REF }}
3333
- uses: dsherret/rust-toolchain-file@v1
34-
- name: Checkout docs
35-
uses: actions/checkout@v4
36-
with:
37-
repository: clockworklabs/spacetime-docs
38-
ref: master
39-
path: spacetime-docs
4034
- name: Check for docs change
4135
run: |
42-
cargo run --features markdown-docs -p spacetimedb-cli > spacetime-docs/docs/cli-reference.md
43-
cd spacetime-docs
36+
cargo run --features markdown-docs -p spacetimedb-cli > docs/docs/cli-reference.md
37+
cd docs
4438
# This is needed because our website doesn't render markdown quite properly.
45-
# See the README in spacetime-docs for more details.
39+
# See the README in docs for more details.
4640
sed -i'' -E 's!^(##) `(.*)`$!\1 \2!' docs/cli-reference.md
4741
sed -i'' -E 's!^(######) \*\*(.*)\*\*$!\1 <b>\2</b>!' docs/cli-reference.md
4842
git status

docs/.github/workflows/check-cli-reference.yml

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

docs/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## Migration note
2+
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.
3+
14
## SpacetimeDB Documentation
25

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

1215
```bash
13-
git clone ssh://git@github.com/<username>/spacetime-docs
16+
git clone ssh://git@github.com/<username>/SpacetimeDB
17+
cd SpacetimeDB/docs
1418
```
1519

1620
3. Make your edits to the docs that you want to make + test them locally
@@ -33,7 +37,6 @@ git push -u origin a-branch-name-that-describes-my-change
3337
> 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.
3438
3539
#### CLI Reference Section
36-
1. Make sure that https://github.com/clockworklabs/SpacetimeDB/pull/2276 is included in your `spacetimedb-cli` binary
3740
1. Run `cargo run --features markdown-docs -p spacetimedb-cli > cli-reference.md`
3841

3942
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):

0 commit comments

Comments
 (0)