Skip to content

Commit 290c572

Browse files
authored
Merge pull request #13 from autoMBD/12-add-docs
12 add docs
2 parents ba31bcd + c868690 commit 290c572

79 files changed

Lines changed: 34116 additions & 15 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to AMBD-MC
1+
# Contributing to TestRepo
22

33
Thank you for your interest and contributions! To ensure high-quality collaboration, please follow the process below.
44

.github/workflows/github_workflows_ci.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,4 @@ jobs:
4545
pytest -q || { echo "pytest failed"; exit 1; }
4646
else
4747
echo "No tests/ directory found, skipping pytest."
48-
fi
49-
50-
- name: Build docs if mkdocs.yml exists
51-
run: |
52-
if [ -f "mkdocs.yml" ]; then
53-
python -m pip install mkdocs
54-
mkdocs build
55-
else
56-
echo "No mkdocs.yml, skipping docs build."
5748
fi
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Build and deploy docs
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: '3.11'
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install mkdocs-material
30+
31+
- name: Build docs
32+
run: |
33+
mkdocs build --verbose
34+
35+
- name: Check site directory
36+
run: |
37+
ls -la
38+
test -d site || (echo "site directory not found" && exit 1)
39+
40+
- name: Set up Node.js
41+
uses: actions/setup-node@v4
42+
with:
43+
node-version: '18'
44+
45+
- name: Check links (optional)
46+
run: |
47+
npm install -g markdown-link-check
48+
# 检查docs目录下的所有markdown文件,忽略错误
49+
find ./docs -name "*.md" -exec markdown-link-check {} \; || true
50+
51+
- name: Upload site artifact
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: site
55+
path: site
56+
retention-days: 1
57+
58+
deploy:
59+
needs: build
60+
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'pull_request' && github.base_ref == 'main')
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Download artifact
64+
uses: actions/download-artifact@v4
65+
with:
66+
name: site
67+
path: site
68+
- name: Setup Pages
69+
uses: actions/configure-pages@v4
70+
- name: Upload artifact
71+
uses: actions/upload-pages-artifact@v4
72+
with:
73+
path: site
74+
- name: Deploy to GitHub Pages
75+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Ignore Visual Studio Code settings folder
2+
.vscode
3+
4+
# Ignore test build directory
5+
_test_build/

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# AMBD-MC
1+
# TestRepo
22

33
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](#license)
44
[![CI](https://github.com/autoMBD/TestRepo/actions/workflows/github_workflows_ci.yml/badge.svg)](https://github.com/autoMBD/TestRepo/actions/workflows/github_workflows_ci.yml)
5-
[![Contributors](https://img.shields.io/github/contributors/autoMBD/AMBD-MC)](#contributors)
5+
[![Downloads](https://img.shields.io/github/downloads/autoMBD/TestRepo/total)](https://github.com/autoMBD/TestRepo/releases)
6+
[![Contributors](https://img.shields.io/github/contributors/autoMBD/TestRepo)](#contributors)
67
[![Docs](https://img.shields.io/badge/docs-available-brightgreen)](#docs)
78

89
简短一句话描述项目核心价值与场景。
@@ -15,8 +16,8 @@
1516
## 快速开始(3 步)
1617
1. 克隆仓库
1718
```bash
18-
git clone https://github.com/autoMBD/AMBD-MC.git
19-
cd AMBD-MC
19+
git clone https://github.com/autoMBD/TestRepo.git
20+
cd TestRepo
2021
```
2122
2. 安装依赖(举例)
2223
```bash
@@ -49,4 +50,4 @@
4950
(可补充联系方式)
5051

5152
## License
52-
本项目采用 MIT 许可证,详见 LICENSE 文件。
53+
本项目采用 MIT 许可证,详见 LICENSE 文件。

0 commit comments

Comments
 (0)