Skip to content

Commit 1bc954a

Browse files
committed
[bfops/docs-ci]: Update GitHub-related files for docs migration
1 parent 5fe544a commit 1bc954a

5 files changed

Lines changed: 15 additions & 63 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ jobs:
2222
node-version: '16' # or the version of Node.js you're using
2323

2424
- name: Install dependencies
25+
working-directory: docs
2526
run: |
2627
npm install
2728
2829
- name: Run link check
30+
working-directory: docs
2931
run: |
3032
npm run check-links

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,27 @@ jobs:
2323
node-version: '16'
2424

2525
- name: Install dependencies
26+
working-directory: docs
2627
run: |
2728
npm install
2829
2930
- name: Backup existing nav.js
31+
working-directory: docs
3032
run: |
3133
mv docs/nav.js docs/nav.js.original
3234
3335
- name: Build nav.ts
36+
working-directory: docs
3437
run: |
3538
npm run build
3639
3740
- name: Compare generated nav.js with original nav.js
41+
working-directory: docs
3842
run: |
3943
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)
4044
4145
- name: Restore original nav.js
46+
working-directory: docs
4247
if: success() || failure()
4348
run: |
4449
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)