Create the setup for the documentation page (#171)

* don't run for generated docusaurus

* format

* workflow to autoupdate docs version

* fix versioning

* add link back to app

* remove old docs

* html link???

* don't track .docusaurus

* documantation build
This commit is contained in:
Shaheer Sarfaraz
2026-02-15 22:50:52 +00:00
committed by GitHub
parent 3c41df9ba8
commit 1f929dfc7f
76 changed files with 105 additions and 2786 deletions
+16 -1
View File
@@ -76,7 +76,22 @@ jobs:
run: npm --workspace orchestrator run build:client
working-directory: .
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci --workspaces --include-workspace-root
working-directory: .
- name: Build documentation site
if: matrix.project == 'orchestrator'
run: npm run check:docs
working-directory: .
+62
View File
@@ -0,0 +1,62 @@
name: docs-version
on:
push:
tags: ["v*"]
permissions:
contents: write
concurrency:
group: docs-version-${{ github.ref }}
cancel-in-progress: true
jobs:
version-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci --workspaces --include-workspace-root
working-directory: .
- name: Derive docs version from tag
id: vars
run: |
VERSION="${GITHUB_REF_NAME#v}"
if [ -z "$VERSION" ]; then
echo "Unable to derive version from tag '$GITHUB_REF_NAME'" >&2
exit 1
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Generate docs version
run: npm run docs:version -- "${{ steps.vars.outputs.version }}"
working-directory: .
- name: Commit and push generated docs version files
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add docs-site/versions.json docs-site/versioned_docs docs-site/versioned_sidebars
if git diff --cached --quiet; then
echo "No docs version changes detected; skipping commit."
exit 0
fi
git commit -m "docs: cut version ${{ steps.vars.outputs.version }}"
git push origin HEAD:main