docs: setup typedoc (#192) #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Synchronize Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "docs/**" | |
| - "packages/ecs-lib/docs/**" | |
| - "packages/ecs-lib/wasm/**" | |
| workflow_dispatch: | |
| jobs: | |
| synchronize: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout engine | |
| uses: actions/checkout@v5 | |
| with: | |
| path: engine | |
| - name: Checkout docs | |
| uses: actions/checkout@v5 | |
| with: | |
| path: docs | |
| repository: nanoforge-dev/docs | |
| token: ${{ secrets.ACTIONS_KEY }} | |
| - name: Install Node.js v24 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| package-manager-cache: false | |
| registry-url: https://registry.npmjs.org/ | |
| - uses: pnpm/action-setup@v4.1.0 | |
| name: Install pnpm | |
| with: | |
| run_install: false | |
| version: 10.22.0 # Couldnt find a way to execute this action in the right directory | |
| - name: setup git | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "username@users.noreply.github.com" | |
| - name: install doxygen | |
| uses: ssciwr/doxygen-install@v1 | |
| - name: install deps | |
| run: cd engine && pnpm i | |
| - name: synchronize docs | |
| run: | | |
| cd engine | |
| ./scripts/build_docs.sh | |
| cd .. | |
| rm docs/engine -rf | |
| mkdir -p docs/engine | |
| cp -r engine/docs/* docs/engine | |
| cd docs | |
| git add . || echo "No changes to add" | |
| git commit -m "chore(engine): updating docs" || echo "No changes to commit" | |
| git push origin main || echo "No changes to push" |