Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2af97c5
feat: Add comprehensive Docker multi-mode deployment and documentatio…
claude Nov 6, 2025
371cd22
feat: Add Docker MCP Registry submission files
claude Nov 6, 2025
5e5ed9e
docs: Add MCP Registry submission summary
claude Nov 6, 2025
375fbd3
docs: Add comprehensive configuration guide for deployment setup
claude Nov 6, 2025
3604c5a
fix: Update documentation domain from docs.vantagecraft.dev to code-g…
claude Nov 6, 2025
8418f6f
fix: Complete domain update in CONFIGURATION_GUIDE.md
claude Nov 6, 2025
1f81753
Initial plan
Copilot Nov 6, 2025
b49a21e
fix: Apply PR review feedback - align Python version and improve Olla…
Copilot Nov 6, 2025
927caed
Merge pull request #17 from royisme/copilot/sub-pr-16
royisme Nov 6, 2025
a44c35a
fix: Remove temporary docs and fix Docker README dependency
claude Nov 6, 2025
f02785d
fix: Fix mkdocs build errors for GitHub Pages
claude Nov 6, 2025
5ab7f5b
feat: Add SVG logo and favicon for documentation site
claude Nov 6, 2025
8fd2c52
Initial plan
Copilot Nov 6, 2025
737a287
docs: Add comprehensive deployment and getting started guides
claude Nov 6, 2025
219e826
fix: Fix Docker build by copying source files before package installa…
Copilot Nov 6, 2025
b2ec7bf
docs: Add complete user guides for Code Graph, Memory, Knowledge RAG,…
claude Nov 6, 2025
2748611
docs: Add API reference, architecture, development, and support docs
claude Nov 6, 2025
647dd94
Merge pull request #18 from royisme/copilot/sub-pr-16
royisme Nov 6, 2025
fccd5e9
fix: Fix all broken documentation links for mkdocs build
claude Nov 6, 2025
6ec5956
fix: Remove manual TOC sections to fix anchor link warnings
claude Nov 6, 2025
edfe4ee
feat: Add automated version management system with bump-my-version
claude Nov 6, 2025
3f3a479
docs: Add GitHub Pages deployment troubleshooting guide
claude Nov 6, 2025
3d93a2e
feat: Add automatic changelog generation from git commits
claude Nov 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[tool.bumpversion]
# 当前版本号(自动从 pyproject.toml 读取)
current_version = "0.7.0"

# 版本解析格式(支持 major.minor.patch)
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"

# 版本序列化格式
serialize = ["{major}.{minor}.{patch}"]

# 搜索和替换的格式
search = "{current_version}"
replace = "{new_version}"

# Git 集成
commit = true
commit_args = ""
tag = true
tag_name = "v{new_version}"
tag_message = "Release version {new_version}"
sign_tags = false

# 允许 dirty 工作区(如果需要)
allow_dirty = false

# 提交信息模板
message = "chore: bump version from {current_version} to {new_version}"

# 需要更新版本号的文件列表
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

[[tool.bumpversion.files]]
filename = "src/__version__.py"
search = '__version__ = "{current_version}"'
replace = '__version__ = "{new_version}"'

# Note: docs/changelog.md is now automatically generated by scripts/generate-changelog.py
# It's called by scripts/bump-version.sh before bump-my-version runs

# 版本部分定义
[tool.bumpversion.parts.major]
# major 版本从 0 开始,递增到任意数字
values = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]

[tool.bumpversion.parts.minor]
# minor 版本从 0 开始,递增到任意数字
values = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]

[tool.bumpversion.parts.patch]
# patch 版本从 0 开始,递增到任意数字
values = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
246 changes: 246 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
name: Build and Push Docker Images

on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
workflow_dispatch:

env:
DOCKER_USER: royisme
DOCKER_REGISTRY: docker.io

jobs:
validate-version:
name: Validate Version Consistency
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Validate version consistency
run: |
echo "=== Version Validation ==="

# Get version from pyproject.toml
PROJECT_VERSION=$(grep '^version = ' pyproject.toml | cut -d'"' -f2)
echo "pyproject.toml version: $PROJECT_VERSION"

# Get version from __version__.py
VERSION_PY=$(grep '__version__ = ' src/__version__.py | cut -d'"' -f2)
echo "__version__.py version: $VERSION_PY"

# Validate Python version file
if [[ "$PROJECT_VERSION" != "$VERSION_PY" ]]; then
echo "❌ Error: Version mismatch!"
echo " pyproject.toml: $PROJECT_VERSION"
echo " __version__.py: $VERSION_PY"
exit 1
fi

# If this is a tag push, validate tag version
if [[ $GITHUB_REF == refs/tags/* ]]; then
TAG_VERSION=${GITHUB_REF#refs/tags/v}
echo "Git tag version: v$TAG_VERSION"

if [[ "$PROJECT_VERSION" != "$TAG_VERSION" ]]; then
echo "❌ Error: Version mismatch with tag!"
echo " pyproject.toml: $PROJECT_VERSION"
echo " Git tag: $TAG_VERSION"
exit 1
fi
fi

echo "✅ All versions consistent: $PROJECT_VERSION"

build-minimal:
needs: validate-version
name: Build Minimal Image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_USER }}/codebase-rag
tags: |
type=ref,event=branch,suffix=-minimal
type=ref,event=pr,suffix=-minimal
type=semver,pattern={{version}},suffix=-minimal
type=semver,pattern={{major}}.{{minor}},suffix=-minimal
type=raw,value=minimal,enable={{is_default_branch}}
type=raw,value=minimal-latest,enable={{is_default_branch}}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile.minimal
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64

build-standard:
needs: validate-version
name: Build Standard Image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_USER }}/codebase-rag
tags: |
type=ref,event=branch,suffix=-standard
type=ref,event=pr,suffix=-standard
type=semver,pattern={{version}},suffix=-standard
type=semver,pattern={{major}}.{{minor}},suffix=-standard
type=raw,value=standard,enable={{is_default_branch}}
type=raw,value=standard-latest,enable={{is_default_branch}}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile.standard
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64

build-full:
needs: validate-version
name: Build Full Image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_USER }}/codebase-rag
tags: |
type=ref,event=branch,suffix=-full
type=ref,event=pr,suffix=-full
type=semver,pattern={{version}},suffix=-full
type=semver,pattern={{major}}.{{minor}},suffix=-full
type=raw,value=full,enable={{is_default_branch}}
type=raw,value=full-latest,enable={{is_default_branch}}
type=raw,value=latest,enable={{is_default_branch}}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile.full
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64

create-release:
name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
needs: [build-minimal, build-standard, build-full]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Create Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
body: |
## Docker Images

### Minimal (Code Graph only)
```bash
docker pull royisme/codebase-rag:minimal
docker pull royisme/codebase-rag:${{ github.ref_name }}-minimal
```

### Standard (Code Graph + Memory)
```bash
docker pull royisme/codebase-rag:standard
docker pull royisme/codebase-rag:${{ github.ref_name }}-standard
```

### Full (All Features)
```bash
docker pull royisme/codebase-rag:full
docker pull royisme/codebase-rag:${{ github.ref_name }}-full
docker pull royisme/codebase-rag:latest
```

## Quick Start

See [documentation](https://code-graph.vantagecraft.dev) for detailed setup instructions.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

notify:
name: Notify Build Status
needs: [build-minimal, build-standard, build-full]
if: always()
runs-on: ubuntu-latest
steps:
- name: Build Summary
run: |
echo "## 🐳 Docker Build Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- **Minimal**: ✅ Built" >> $GITHUB_STEP_SUMMARY
echo "- **Standard**: ✅ Built" >> $GITHUB_STEP_SUMMARY
echo "- **Full**: ✅ Built" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Images available at: https://hub.docker.com/r/royisme/codebase-rag" >> $GITHUB_STEP_SUMMARY
73 changes: 73 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Deploy Documentation

on:
push:
branches:
- main
paths:
- 'docs/**'
- 'mkdocs.yml'
- '.github/workflows/docs-deploy.yml'
pull_request:
branches:
- main
paths:
- 'docs/**'
- 'mkdocs.yml'
workflow_dispatch:

permissions:
contents: write
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for git info plugin

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip'

- name: Install dependencies
run: |
pip install --upgrade pip
pip install mkdocs-material
pip install mkdocs-minify-plugin
pip install mkdocs-git-revision-date-localized-plugin

- name: Build documentation
run: mkdocs build --strict

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: site

deploy:
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

- name: Notify deployment
run: |
echo "📚 Documentation deployed successfully!"
echo "🔗 URL: https://code-graph.vantagecraft.dev"
Loading
Loading