fix(docs): publish directly from LangBot before archiving docs repository

Co-authored-by: multica-agent <[email protected]>
This commit is contained in:
Chin Rock
2026-10-27 16:54:17 +08:00
co-authored by multica-agent
parent 407352cc51
commit fe8fa51b50
24 changed files with 133 additions and 104 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ concurrency:
jobs:
sync:
if: github.repository == 'langbot-app/LangBot' && github.ref == 'refs/heads/master' && vars.DOCS_MIRROR_ENABLED == 'true'
if: github.repository == 'langbot-app/LangBot' && github.ref == 'refs/heads/master' && vars.DOCS_PUBLISH_ENABLED == 'true'
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
@@ -26,7 +26,7 @@ jobs:
with:
ref: master
fetch-depth: 0
# A PAT push triggers the mirror and Wiki workflows; GITHUB_TOKEN does not.
# A PAT push triggers the landing and Wiki workflows; GITHUB_TOKEN does not.
token: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN || secrets.RELEASE_UPLOAD_GITHUB_TOKEN }}
- uses: actions/setup-node@v7
with:
+1 -1
View File
@@ -57,7 +57,7 @@ jobs:
sync:
name: Publish to LangBot Wiki
if: github.event_name != 'pull_request' && github.repository == 'langbot-app/LangBot' && github.ref == 'refs/heads/master' && vars.DOCS_MIRROR_ENABLED == 'true'
if: github.event_name != 'pull_request' && github.repository == 'langbot-app/LangBot' && github.ref == 'refs/heads/master' && vars.DOCS_PUBLISH_ENABLED == 'true'
needs: build
runs-on: ubuntu-latest
timeout-minutes: 5
+2 -12
View File
@@ -1,4 +1,4 @@
name: Sync docs mirror and landing submodule
name: Sync landing docs from LangBot
on:
push:
@@ -15,7 +15,7 @@ concurrency:
jobs:
sync:
if: github.repository == 'langbot-app/LangBot' && github.ref == 'refs/heads/master' && vars.DOCS_MIRROR_ENABLED == 'true'
if: github.repository == 'langbot-app/LangBot' && github.ref == 'refs/heads/master' && vars.DOCS_PUBLISH_ENABLED == 'true'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
@@ -27,16 +27,6 @@ jobs:
- 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 || secrets.RELEASE_UPLOAD_GITHUB_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: