Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Commit ab6d88b

Browse files
authored
Merge pull request #166 from zouyonghe/feat/wiki-sync-ci
feat: sync docs content to astrbot wiki
2 parents 5df6559 + 7a29acf commit ab6d88b

File tree

6 files changed

+1206
-3
lines changed

6 files changed

+1206
-3
lines changed

.github/workflows/sync-wiki.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: sync wiki
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- v4
8+
paths:
9+
- '.github/workflows/sync-wiki.yml'
10+
- 'scripts/sync_docs_to_wiki.py'
11+
- 'tests/test_sync_docs_to_wiki.py'
12+
- 'zh/**'
13+
- 'en/**'
14+
15+
concurrency:
16+
group: sync-wiki-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
sync:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
25+
steps:
26+
- name: Validate manual ref
27+
if: github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/v4'
28+
run: |
29+
echo "This workflow only publishes from refs/heads/v4. Re-run it from the v4 branch."
30+
exit 1
31+
32+
- name: Check out docs repository
33+
uses: actions/checkout@v4
34+
35+
- name: Set up Python
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: '3.11'
39+
40+
- name: Run sync unit tests
41+
run: python -m unittest discover -s tests -p 'test_sync_docs_to_wiki.py' -v
42+
43+
- name: Validate internal doc links
44+
run: python scripts/sync_docs_to_wiki.py --source-root . --check-links-only
45+
46+
- name: Clone AstrBot wiki
47+
env:
48+
WIKI_TOKEN: ${{ secrets.ASTRBOT_WIKI_TOKEN }}
49+
run: |
50+
test -n "$WIKI_TOKEN"
51+
git clone "https://x-access-token:${WIKI_TOKEN}@github.com/AstrBotDevs/AstrBot.wiki.git" wiki
52+
53+
- name: Generate wiki pages
54+
run: python scripts/sync_docs_to_wiki.py --source-root . --wiki-root wiki
55+
56+
- name: Commit and push wiki changes
57+
working-directory: wiki
58+
run: |
59+
git config user.name "github-actions[bot]"
60+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
61+
git add .
62+
if git diff --cached --quiet; then
63+
echo "No wiki changes to push"
64+
exit 0
65+
fi
66+
git commit -m "docs: sync wiki from AstrBot-docs"
67+
git push

en/dev/plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
本页面已经迁移至 [插件基础开发](/dev/star/plugin)
1+
This page has moved to [AstrBot Plugin Development Guide](/en/dev/star/plugin-new).

en/dev/star/guides/ai.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ AstrBot provides built-in support for multiple Large Language Model (LLM) provid
55

66
You can use the LLM / Agent interfaces provided by AstrBot to implement your own intelligent agents.
77

8-
Starting from version `v4.5.7`, we've made significant improvements to the way LLM providers are invoked. We recommend using the new approach, which is more concise and supports additional features. Of course, you can still use the [legacy invocation method](/dev/star/plugin#ai).
8+
Starting from version `v4.5.7`, we've made significant improvements to the way LLM providers are invoked. We recommend using the new approach, which is more concise and supports additional features. The legacy invocation method remains documented in the previous Chinese-only guide.
99

1010
## Getting the Chat Model ID for the Current Session
1111

en/use/plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Starting from version `3.4.0`, AstrBot renamed plugins to `Star`. AstrBot is a h
44

55
Use `/plugin` to view all plugins. You can also manage installed plugins in the admin panel.
66

7-
If you want to develop your own plugin, see [Implement a Plugin in a Few Lines of Code](/dev/star/plugin).
7+
If you want to develop your own plugin, see [AstrBot Plugin Development Guide](/en/dev/star/plugin-new).

0 commit comments

Comments
 (0)