chore: rename internal docs/ to dev-docs/ and prepare docs site merge

Move the 27 internal design docs (87 tracked files) from docs/ to dev-docs/
to make room for the public documentation site, adjust Docker/fnOS ignores,
refresh the README/AGENTS/ARCHITECTURE references, and land the docs
workflows ahead of the subtree import so they cannot diverge from mirror.

Co-Authored-By: Mika (Multica) <[email protected]>
Co-authored-by: multica-agent <[email protected]>
This commit is contained in:
RockChinQ
2026-10-27 08:04:20 +00:00
co-authored by Mika multica-agent
parent a89ddf12e1
commit 0582d1b3d4
109 changed files with 339 additions and 17 deletions
+29
View File
@@ -0,0 +1,29 @@
name: Docs tests
on:
pull_request:
paths: ['docs/**', '.github/workflows/*docs*.yml', '.github/workflows/sync-*.yml']
workflow_dispatch:
permissions:
contents: read
jobs:
docs:
name: Fumapress docs build
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: docs
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '24'
cache: npm
cache-dependency-path: docs/package-lock.json
- run: npm ci
- run: npm run typecheck
- run: npm test
- run: npm run build
+62
View File
@@ -0,0 +1,62 @@
name: Sync LangBot Blog articles
on:
workflow_dispatch:
schedule:
- cron: '17 2 * * *'
permissions:
contents: read
concurrency:
group: sync-langbot-blog-articles
cancel-in-progress: false
jobs:
sync:
if: github.repository == 'langbot-app/LangBot' && github.ref == 'refs/heads/main' && vars.DOCS_MIRROR_ENABLED == 'true'
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
working-directory: docs
steps:
- name: Check out main
uses: actions/checkout@v5
with:
ref: main
fetch-depth: 0
# A PAT push triggers the mirror and Wiki workflows; GITHUB_TOKEN does not.
token: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN }}
- uses: actions/setup-node@v7
with:
node-version: '24'
cache: npm
cache-dependency-path: docs/package-lock.json
- run: npm ci
- name: Check out LangBot landing page
uses: actions/checkout@v5
with:
repository: langbot-app/langbot-landing-page
token: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN }}
path: .article-source
persist-credentials: false
- name: Synchronize articles and images
run: node scripts/sync-blog-articles.mjs --source ../.article-source
- name: Validate generated articles
run: |
node scripts/sync-blog-articles.mjs --check --source ../.article-source
node scripts/sync-blog-articles.mjs --check
npm test
npm run build
- name: Commit synchronized content
run: |
git add docs.json en/articles zh/articles ja/articles images/articles scripts/blog-articles-manifest.json
if git diff --cached --quiet; then
echo 'LangBot Blog articles are already synchronized.'
exit 0
fi
git config user.name 'langbot-docs-bot'
git config user.email '[email protected]'
git commit -m 'docs(articles): sync LangBot Blog'
git push origin HEAD:main
+90
View File
@@ -0,0 +1,90 @@
name: Sync GitHub Wiki
on:
push:
branches: [main]
paths:
- "docs/en/**"
- "docs/zh/**"
- "docs/ja/**"
- "docs/scripts/build-github-wiki.py"
- ".github/workflows/sync-github-wiki.yml"
pull_request:
paths:
- "docs/en/**"
- "docs/zh/**"
- "docs/ja/**"
- "docs/scripts/build-github-wiki.py"
- "docs/tests/test_build_github_wiki.py"
- ".github/workflows/sync-github-wiki.yml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: sync-langbot-github-wiki
cancel-in-progress: false
jobs:
build:
defaults:
run:
working-directory: docs
name: Build Wiki mirror
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Run converter tests
run: python -m unittest tests/test_build_github_wiki.py
- name: Build Wiki pages
run: python scripts/build-github-wiki.py --output dist/github-wiki
- name: Validate generated pages
run: |
test -f dist/github-wiki/Home.md
test -f dist/github-wiki/_Sidebar.md
test "$(find dist/github-wiki -maxdepth 1 -name '*.md' | wc -l)" -gt 250
- name: Upload generated Wiki
uses: actions/upload-artifact@v7
with:
name: github-wiki
path: docs/dist/github-wiki
if-no-files-found: error
sync:
name: Publish to LangBot Wiki
if: github.event_name != 'pull_request' && github.repository == 'langbot-app/LangBot' && github.ref == 'refs/heads/main' && vars.DOCS_MIRROR_ENABLED == 'true'
needs: build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/download-artifact@v8
with:
name: github-wiki
path: generated
- name: Clone target Wiki
env:
WIKI_PUSH_TOKEN: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN }}
run: |
test -n "$WIKI_PUSH_TOKEN"
git clone "https://x-access-token:${WIKI_PUSH_TOKEN}@github.com/langbot-app/LangBot.wiki.git" target
- name: Replace and publish Wiki contents
env:
SOURCE_SHA: ${{ github.sha }}
run: |
find target -mindepth 1 -maxdepth 1 ! -name .git -exec rm -rf {} +
cp -a generated/. target/
cd target
git add -A
if git diff --cached --quiet; then
echo "GitHub Wiki is already up to date."
exit 0
fi
git config user.name "langbot-docs-sync[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -m "docs: sync from LangBot/docs@${SOURCE_SHA::7}"
git push origin HEAD:master
@@ -0,0 +1,44 @@
name: Sync docs mirror and landing submodule
on:
push:
branches: [main]
paths: ['docs/**', '.github/workflows/sync-landing-submodule.yml']
workflow_dispatch:
permissions:
contents: read
concurrency:
group: sync-landing-docs-main
cancel-in-progress: false
jobs:
sync:
if: github.repository == 'langbot-app/LangBot' && github.ref == 'refs/heads/main' && vars.DOCS_MIRROR_ENABLED == 'true'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
with:
ref: main
fetch-depth: 0
persist-credentials: false
- name: Test synchronization contracts
working-directory: docs
run: python3 -m unittest discover -s tests -p test_sync_landing_submodule.py -v
- name: Publish docs subtree (fast-forward only)
env:
GH_TOKEN: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN }}
run: |
gh auth setup-git
git remote add docs-mirror https://github.com/langbot-app/langbot-docs.git
git fetch docs-mirror main
docs_sha=$(git subtree split --prefix=docs)
git merge-base --is-ancestor docs-mirror/main "$docs_sha"
git push docs-mirror "$docs_sha:refs/heads/main"
- name: Update landing submodule and production fork
working-directory: docs
env:
GH_TOKEN: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN }}
run: python3 scripts/sync-landing-submodule.py