Skip to content

Commit fa908e7

Browse files
authored
docs: setup typedoc (#192)
* ci(docs): fix pushing not pushing xml * docs(build): setup typedoc to generate documentation from ts files * docs: finish setup autodoc everywhere needed
1 parent 77a7dbe commit fa908e7

File tree

39 files changed

+447
-15
lines changed

39 files changed

+447
-15
lines changed

.github/workflows/push-docs.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,39 @@ jobs:
2626
repository: nanoforge-dev/docs
2727
token: ${{ secrets.ACTIONS_KEY }}
2828

29+
- name: Install Node.js v24
30+
uses: actions/setup-node@v6
31+
with:
32+
node-version: 24
33+
package-manager-cache: false
34+
registry-url: https://registry.npmjs.org/
35+
36+
- uses: pnpm/action-setup@v4.1.0
37+
name: Install pnpm
38+
with:
39+
run_install: false
40+
version: 10.22.0 # Couldnt find a way to execute this action in the right directory
41+
2942
- name: setup git
3043
run: |
3144
git config --global user.name "github-actions[bot]"
3245
git config --global user.email "username@users.noreply.github.com"
3346
34-
- name: setup registry code documentation
35-
uses: mattnotmitt/doxygen-action@v1
36-
with:
37-
doxyfile-path: engine/packages/ecs-lib/docs/Doxyfile
47+
- name: install doxygen
48+
uses: ssciwr/doxygen-install@v1
49+
50+
- name: install deps
51+
run: cd engine && pnpm i
3852

3953
- name: synchronize docs
4054
run: |
41-
cp -r engine/packages/ecs-lib/docs engine/docs/registry/api
55+
cd engine
56+
./scripts/build_docs.sh
57+
cd ..
58+
rm docs/engine -rf
4259
mkdir -p docs/engine
4360
cp -r engine/docs/* docs/engine
4461
cd docs
45-
git add .
46-
git commit -m "chore(engine): updating docs"
47-
git push origin main
62+
git add . || echo "No changes to add"
63+
git commit -m "chore(engine): updating docs" || echo "No changes to commit"
64+
git push origin main || echo "No changes to push"

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,9 @@ dist
227227
.turbo/
228228

229229
compile_commands.json
230+
docs_markdown
231+
xml
232+
docs_build
233+
docs/conf.py
234+
docs/*/api/index.md
235+
docs/ecs-lib/api/typescript.md

docs/asset-manager/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
asset-manager
2+
==================
3+
4+
.. toctree::
5+
6+
7+
api/index.md

docs/common/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
common
2+
==================
3+
4+
.. toctree::
5+
6+
7+
api/index.md

docs/config/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
config
2+
==================
3+
4+
.. toctree::
5+
6+
7+
api/index.md

docs/core/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
core
2+
==================
3+
4+
.. toctree::
5+
6+
7+
api/index.md

docs/ecs-client/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ecs-client
2+
==================
3+
4+
.. toctree::
5+
6+
7+
api/index.md

docs/ecs-lib/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ECS Documentation
2+
=================
3+
4+
.. toctree::
5+
6+
7+
wasm.rst
8+
api/typescript.rst

docs/ecs-lib/wasm.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
C++ classes
2+
-----------
3+
4+
.. doxygenclass:: nfo::Registry
5+
:members:
6+
7+
.. doxygenclass:: nfo::Entity
8+
:members:
9+
10+
.. doxygenclass:: nfo::SparseArray
11+
:members:

docs/ecs-server/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ecs-server
2+
==================
3+
4+
.. toctree::
5+
6+
7+
api/index.md

0 commit comments

Comments
 (0)