[verified] feat: synchronize Blog articles into Wiki (#113)

Co-authored-by: dadachann <[email protected]>
This commit is contained in:
Hyu
2026-08-26 02:05:29 +08:00
committed by GitHub
co-authored by dadachann
parent fa48e37c20
commit 1fd6c29cc5
113 changed files with 21493 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
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
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-wiki-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