feat: merge langbot-docs history into docs/ (subtree, no squash)

Imported langbot-app/langbot-docs main (51dddcb3f) under docs/ with
`git subtree add`, keeping every original commit SHA and signature so the
mirror and landing-page submodule can fast-forward from a `git subtree
split` later. Retarget the docs workflows to docs/, point blog sync at the
main repository, and update the remaining internal references.

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:39 +00:00
co-authored by Mika multica-agent
parent 9d2042478a
commit 3e0be870ab
12 changed files with 50 additions and 189 deletions
+7 -47
View File
@@ -1,53 +1,13 @@
name: Sync LangBot Blog articles
# Workflows run from langbot-app/LangBot/.github/workflows after migration.
# Keep this mirror entry inert: no job may write directly to langbot-docs.
name: Legacy docs workflow (migrated)
on:
workflow_dispatch:
schedule:
- cron: "17 2 * * *"
permissions:
contents: write
concurrency:
group: sync-langbot-blog-articles
cancel-in-progress: false
contents: read
jobs:
sync:
migrated:
if: ${{ false }}
runs-on: ubuntu-latest
steps:
- name: Check out Wiki
uses: actions/checkout@v5
with:
fetch-depth: 0
- 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
npx --yes [email protected] validate
- name: Commit synchronized content
run: |
rm -rf .article-source
if git diff --quiet && test -z "$(git status --short)"; 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 add docs.json en/articles zh/articles ja/articles images/articles scripts/blog-articles-manifest.json
git commit -m "docs(articles): sync LangBot Blog"
git push
- run: echo 'Use the LangBot repository workflows.'
+6 -80
View File
@@ -1,87 +1,13 @@
name: Sync GitHub Wiki
# Workflows run from langbot-app/LangBot/.github/workflows after migration.
# Keep this mirror entry inert: no job may write directly to langbot-docs.
name: Legacy docs workflow (migrated)
on:
push:
branches: [main]
paths:
- "en/**"
- "zh/**"
- "ja/**"
- "scripts/build-github-wiki.py"
- ".github/workflows/sync-github-wiki.yml"
pull_request:
paths:
- "en/**"
- "zh/**"
- "ja/**"
- "scripts/build-github-wiki.py"
- "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:
name: Build Wiki mirror
migrated:
if: ${{ false }}
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: dist/github-wiki
if-no-files-found: error
sync:
name: Publish to LangBot Wiki
if: github.event_name != 'pull_request'
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
- run: echo 'Use the LangBot repository workflows.'
+6 -22
View File
@@ -1,29 +1,13 @@
name: Sync landing docs submodule
# Workflows run from langbot-app/LangBot/.github/workflows after migration.
# Keep this mirror entry inert: no job may write directly to langbot-docs.
name: Legacy docs workflow (migrated)
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: sync-landing-docs-main
cancel-in-progress: false
jobs:
sync:
if: github.repository == 'langbot-app/langbot-docs'
migrated:
if: ${{ false }}
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Test synchronization contracts
run: python3 -m unittest discover -s tests -p test_sync_landing_submodule.py -v
- name: Update landing submodule and production fork
env:
GH_TOKEN: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN }}
run: python3 scripts/sync-landing-submodule.py
- run: echo 'Use the LangBot repository workflows.'
+6 -21
View File
@@ -1,28 +1,13 @@
name: Tests
# Workflows run from langbot-app/LangBot/.github/workflows after migration.
# Keep this mirror entry inert: no job may write directly to langbot-docs.
name: Legacy docs workflow (migrated)
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
docs:
name: Fumapress docs build
migrated:
if: ${{ false }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: "24"
cache: npm
- name: Install dependencies
run: npm ci
- name: Typecheck
run: npm run typecheck
- name: Run documentation contract tests
run: npm test
- name: Build and verify the static site
run: npm run build
- run: echo 'Use the LangBot repository workflows.'
+3 -3
View File
@@ -1,14 +1,14 @@
# [LangBot](https://github.com/langbot-app/LangBot) 官方文档
> 此仓库是 LangBot 的文档仓库,代码仓库:
> 文档源码位于 [LangBot/docs](https://github.com/langbot-app/LangBot/tree/main/docs),[langbot-docs](https://github.com/langbot-app/langbot-docs) 仅作为发布 mirror。
> [LangBot 代码仓库](https://github.com/langbot-app/LangBot)
> 这是 LangBot 4.0 的文档,3.0 文档请见 `v3` 分支
> 这是 LangBot 4.0 的文档,3.0 文档请见 [langbot-docs 的 v3 分支](https://github.com/langbot-app/langbot-docs/tree/v3)
## 参与编写
文档使用 [Fumapress](https://press.fumadocs.dev/) 和 [Fumadocs](https://fumadocs.dev/) 生成,本地开发需要 Node.js 24 或更高版本。
Clone 本仓库,在目录下执行以下命令安装依赖:
Clone LangBot 主仓后进入 `docs/` 目录,执行以下命令安装依赖:
```bash
npm ci
+4 -2
View File
@@ -1,14 +1,16 @@
> Edit documentation in [LangBot/docs](https://github.com/langbot-app/LangBot/tree/main/docs). The [langbot-docs repository](https://github.com/langbot-app/langbot-docs) is a generated publication mirror. Run the commands below from `LangBot/docs/`.
# [LangBot](https://github.com/langbot-app/LangBot) Official Documentation
> This repository is the documentation repository for LangBot. Code repository:
> [LangBot Code Repository](https://github.com/langbot-app/LangBot)
> This is the documentation for LangBot 4.0. For 3.0 documentation, please see the `v3` branch
> This is the documentation for LangBot 4.0. For 3.0 documentation, please see the [langbot-docs v3 branch](https://github.com/langbot-app/langbot-docs/tree/v3)
## Contributing to Documentation
The documentation is built with [Fumapress](https://press.fumadocs.dev/) and [Fumadocs](https://fumadocs.dev/). Local development requires Node.js 24 or later.
Clone this repository and execute the following command in the directory to install dependencies:
Clone LangBot, enter its `docs/` directory, and install dependencies:
```bash
npm ci