Skip to content

Commit 439b45f

Browse files
committed
chore: modify docs file structure and add mkdocs related github actions
1 parent fccf416 commit 439b45f

34 files changed

Lines changed: 4988 additions & 4893 deletions

.github/workflows/docs.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Build and Deploy MkDocs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: pages
17+
cancel-in-progress: true
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.x'
30+
31+
- name: Cache pip
32+
uses: actions/cache@v4
33+
with:
34+
path: ~/.cache/pip
35+
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
36+
restore-keys: |
37+
${{ runner.os }}-pip-
38+
39+
- name: Install MkDocs and theme
40+
run: |
41+
python -m pip install --upgrade pip
42+
pip install "mkdocs>=1.6.0" "mkdocs-material>=9.0.0"
43+
44+
- name: Build site
45+
run: mkdocs build --strict
46+
47+
- name: Upload artifact
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
path: ./site
51+
52+
deploy:
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deploy.outputs.page_url }}
56+
runs-on: ubuntu-latest
57+
needs: build
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deploy
61+
uses: actions/deploy-pages@v4

docs/README.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
# Async Zulip Bot SDK API 文档
1+
# Async Zulip Bot SDK API Documentation
22

3-
欢迎使用 Async Zulip Bot SDK 的 API 文档。本文档提供了该 SDK 所有核心组件的详细说明。
3+
Welcome to the API documentation for Async Zulip Bot SDK. This documentation provides detailed information about all core components of the SDK.
44

5-
## 目录
5+
## Table of Contents
66

7-
- [快速开始](quickstart.md)
8-
- [核心组件](core.md)
9-
- [AsyncClient](async_client.md) - 异步 Zulip API 客户端
10-
- [BaseBot](base_bot.md) - Bot 基类
11-
- [BotRunner](bot_runner.md) - Bot 运行器
12-
- [命令系统](commands.md)
13-
- [CommandParser](commands.md#commandparser) - 命令解析器
14-
- [CommandSpec](commands.md#commandspec) - 命令规范
15-
- [CommandArgument](commands.md#commandargument) - 命令参数
16-
- [数据模型](models.md)
17-
- [请求模型](models.md#请求模型)
18-
- [响应模型](models.md#响应模型)
19-
- [数据类型](models.md#数据类型)
20-
- [配置](config.md)
21-
- [日志](logging.md)
7+
- [Quick Start](quickstart.md)
8+
- [Core Components](core.md)
9+
- [AsyncClient](async_client.md) - Async Zulip API Client
10+
- [BaseBot](base_bot.md) - Bot Base Class
11+
- [BotRunner](bot_runner.md) - Bot Runner
12+
- [Command System](commands.md)
13+
- [CommandParser](commands.md#commandparser) - Command Parser
14+
- [CommandSpec](commands.md#commandspec) - Command Specification
15+
- [CommandArgument](commands.md#commandargument) - Command Arguments
16+
- [Data Models](models.md)
17+
- [Request Types](models.md#request-types)
18+
- [Response Types](models.md#response-types)
19+
- [Data Types](models.md#data-types)
20+
- [Configuration](config.md)
21+
- [Logging](logging.md)
2222

23-
## 简介
23+
## Introduction
2424

25-
Async Zulip Bot SDK 是一个基于 Python asyncio 的异步 Zulip 机器人开发框架。它提供了:
25+
Async Zulip Bot SDK is an asynchronous Zulip bot development framework based on Python asyncio. It provides:
2626

27-
- 🚀 完全异步的 API 客户端
28-
- 🤖 简单易用的 Bot 基类
29-
- 📝 强大的命令解析系统
30-
- 🔧 灵活的配置管理
31-
- 📊 类型安全的数据模型
27+
- 🚀 Fully asynchronous API client
28+
- 🤖 Easy-to-use Bot base class
29+
- 📝 Powerful command parsing system
30+
- 🔧 Flexible configuration management
31+
- 📊 Type-safe data models
3232

33-
## 安装
33+
## Installation
3434

3535
```bash
3636
pip install async-zulip-bot-sdk
3737
```
3838

39-
## 快速示例
39+
## Quick Example
4040

4141
```python
4242
from bot_sdk import BaseBot, BotRunner, AsyncClient, Message
@@ -51,10 +51,10 @@ if __name__ == "__main__":
5151
run_bot(MyBot)
5252
```
5353

54-
## 版本
54+
## Version
5555

56-
当前版本:0.9.1-async
56+
Current version: 0.9.1-async
5757

58-
## 许可证
58+
## License
5959

60-
本项目采用 MIT 许可证。
60+
This project is licensed under the MIT License.

0 commit comments

Comments
 (0)