mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-29 20:05:25 +08:00
fix(ci): fall back to the existing repo PAT for docs publication
The migrated workflows required LANGBOT_WIKI_PUSH_TOKEN, which only exists in the langbot-docs repository. The existing RELEASE_UPLOAD_GITHUB_TOKEN was verified to authenticate as the owner with repo scope plus push/admin on LangBot, langbot-docs, langbot-landing-page and the production fork, and it can push the Wiki, so publication now falls back to it when the dedicated secret is absent. Also retarget the cutover notes at the master branch. 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
c3249a8852
commit
9b3bb30445
@@ -27,7 +27,7 @@ jobs:
|
||||
ref: master
|
||||
fetch-depth: 0
|
||||
# A PAT push triggers the mirror and Wiki workflows; GITHUB_TOKEN does not.
|
||||
token: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN }}
|
||||
token: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN || secrets.RELEASE_UPLOAD_GITHUB_TOKEN }}
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: '24'
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
repository: langbot-app/langbot-landing-page
|
||||
token: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN }}
|
||||
token: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN || secrets.RELEASE_UPLOAD_GITHUB_TOKEN }}
|
||||
path: .article-source
|
||||
persist-credentials: false
|
||||
- name: Synchronize articles and images
|
||||
|
||||
@@ -68,7 +68,7 @@ jobs:
|
||||
path: generated
|
||||
- name: Clone target Wiki
|
||||
env:
|
||||
WIKI_PUSH_TOKEN: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN }}
|
||||
WIKI_PUSH_TOKEN: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN || secrets.RELEASE_UPLOAD_GITHUB_TOKEN }}
|
||||
run: |
|
||||
test -n "$WIKI_PUSH_TOKEN"
|
||||
git clone "https://x-access-token:${WIKI_PUSH_TOKEN}@github.com/langbot-app/LangBot.wiki.git" target
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
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 }}
|
||||
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
|
||||
@@ -40,5 +40,5 @@ jobs:
|
||||
- name: Update landing submodule and production fork
|
||||
working-directory: docs
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.LANGBOT_WIKI_PUSH_TOKEN || secrets.RELEASE_UPLOAD_GITHUB_TOKEN }}
|
||||
run: python3 scripts/sync-landing-submodule.py
|
||||
|
||||
Reference in New Issue
Block a user