File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy Docs
2+ on :
3+ push :
4+ branches :
5+ - main # 只有在推送到 main 分支时触发
6+
7+ permissions :
8+ contents : write
9+
10+ jobs :
11+ deploy :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v4
15+ with :
16+ fetch-depth : 0
17+
18+ - name : Setup Python
19+ uses : actions/setup-python@v5
20+ with :
21+ python-version : 3.x
22+
23+ - name : Install dependencies
24+ run : |
25+ pip install mkdocs-material
26+
27+ # 如果你不想移动文件,可以在这里用命令准备 docs 目录
28+ - name : Prepare docs folder
29+ run : |
30+ mkdir -p docs
31+ cp README.md docs/index.md
32+ cp API.md docs/API.md
33+ cp API.en.md docs/API.en.md
34+
35+ - name : Build and Deploy
36+ run : mkdocs gh-deploy --force
Original file line number Diff line number Diff line change 1+ site_name : TrollScript Release
2+ theme :
3+ name : material
4+ language : zh # 设置界面为中文
5+ features :
6+ - navigation.tabs # 顶部导航栏模式
7+ - content.code.copy # 代码复制按钮
8+
9+ nav :
10+ - 介绍 : index.md # 默认会将仓库的 README.md 链接到这里(见下方说明)
11+ - API ZH 文档 : API.md # 链接你的 API.md
12+ - API Document : API.en.md # 链接你的 API.md
You can’t perform that action at this time.
0 commit comments