Add 'docs/' from commit '51dddcb3f891d60bc38645e88b2dbd515344da81'

git-subtree-dir: docs
git-subtree-mainline: 0582d1b3d4
git-subtree-split: 51dddcb3f8
This commit is contained in:
RockChinQ
2026-10-27 08:04:35 +00:00
847 changed files with 87063 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
name: Sync LangBot Blog articles
on:
workflow_dispatch:
schedule:
- cron: "17 2 * * *"
permissions:
contents: write
concurrency:
group: sync-langbot-blog-articles
cancel-in-progress: false
jobs:
sync:
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
+87
View File
@@ -0,0 +1,87 @@
name: Sync GitHub Wiki
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
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
+29
View File
@@ -0,0 +1,29 @@
name: Sync landing docs submodule
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'
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
+28
View File
@@ -0,0 +1,28 @@
name: Tests
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
docs:
name: Fumapress docs build
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