Skip to content
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
6 changes: 6 additions & 0 deletions .github/actions/pnpm-install/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: "pnpm install"
description: "Run pnpm install with cache enabled"
inputs:
path:
description: Path to run pnpm install in
default: "."
runs:
using: "composite"
steps:
Expand All @@ -13,6 +17,7 @@ runs:
name: Install pnpm
with:
run_install: false
package_json_file: ${{ inputs.path }}/package.json

- name: Expose pnpm config(s) through "$GITHUB_OUTPUT"
id: pnpm-config
Expand Down Expand Up @@ -40,3 +45,4 @@ runs:
pnpm install --frozen-lockfile --prefer-offline --loglevel error
env:
HUSKY: "0"
working-directory: ${{ inputs.path }}
49 changes: 22 additions & 27 deletions .github/workflows/push-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,17 @@ on:
- "packages/ecs-lib/wasm/**"
workflow_dispatch:

env:
SOURCE_PATH: "engine"

jobs:
synchronize:
runs-on: ubuntu-latest
steps:
- name: Checkout engine
uses: actions/checkout@v6
with:
path: engine

- name: Checkout docs
uses: actions/checkout@v6
with:
path: docs-repo
repository: nanoforge-dev/docs
token: ${{ secrets.ACTIONS_KEY }}
path: ${{ env.SOURCE_PATH }}

- name: Install Node.js
uses: actions/setup-node@v6
Expand All @@ -33,27 +29,26 @@ jobs:
package-manager-cache: false
registry-url: https://registry.npmjs.org/

- uses: pnpm/action-setup@v6.0.8
name: Install pnpm
- uses: ./engine/.github/actions/pnpm-install
name: Install dependencies
with:
run_install: false

- name: setup git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "username@users.noreply.github.com"
path: ${{ env.SOURCE_PATH }}

- name: install deps
run: cd engine && pnpm i
- uses: ./engine/.github/actions/emsdk-install
name: Install emsdk

- name: synchronize docs
- name: prepare docs
run: |
cd engine
pnpm run build
pnpm run docs
cd ..
mkdir -p docs-repo/docs/engine
rsync -av engine/docs/* docs-repo/docs/engine/
cd docs-repo
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"
working-directory: ${{ env.SOURCE_PATH }}

- name: synchronize docs
uses: ./engine/node_modules/@nanoforge-dev/actions/src/synchronize-docs
with:
source-docs: ${{ env.SOURCE_PATH }}/docs
destination-docs: docs/engine
repository: nanoforge-dev/docs
config: ${{ env.SOURCE_PATH }}/docs.json
token: ${{ secrets.ACTIONS_KEY }}
commit-message: "Update engine documentation"
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -237,4 +237,6 @@ docs/ecs-lib/api/typescript.md

emsdk-cache/
.vscode
.tsdocs
.tsdocs

docs/api
Loading
Loading