mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-30 04:15:45 +08:00
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:
co-authored by
Mika
multica-agent
parent
9d2042478a
commit
3e0be870ab
+7
-47
@@ -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
@@ -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
@@ -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.'
|
||||
|
||||
Vendored
+6
-21
@@ -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.'
|
||||
|
||||
Reference in New Issue
Block a user