Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
84 changes: 34 additions & 50 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ on:
- 'docs/**'
- 'README.md'
- 'CONTRIBUTING.md'
- 'SECURITY.md'
- 'WORKFLOW_STATUS.md'
- 'mkdocs.yml'
- '*.md'
pull_request:
branches: [ main, master ]
paths:
- 'docs/**'
- 'README.md'
- 'CONTRIBUTING.md'
- 'SECURITY.md'
- 'WORKFLOW_STATUS.md'
- 'mkdocs.yml'
- '*.md'
workflow_dispatch:

Expand Down Expand Up @@ -140,63 +146,41 @@ jobs:

- name: Install dependencies
run: |
pip install mkdocs mkdocs-material mkdocs-mermaid2-plugin
pip install mkdocs mkdocs-material
pip install -r requirements.txt
Comment on lines 147 to 150

- name: Create mkdocs config
run: |
cat > mkdocs.yml << 'MKDOCS_CONFIG'
site_name: AI Shell Documentation
site_description: An intelligent, multi-modal command-line assistant
site_url: https://gizzmo.github.io/Ai_shell/
repo_url: https://github.com/GizzZmo/Ai_shell
repo_name: GizzZmo/Ai_shell

theme:
name: material
palette:
- scheme: default
primary: blue
accent: blue
toggle:
icon: material/brightness-7
name: Switch to dark mode
- scheme: slate
primary: blue
accent: blue
toggle:
icon: material/brightness-4
name: Switch to light mode
features:
- navigation.tabs
- navigation.sections
- navigation.top
- search.highlight
- content.code.copy

nav:
- Home: index.md
- Examples: docs/EXAMPLES.md
- Architecture: docs/ARCHITECTURE.md
- Troubleshooting: docs/TROUBLESHOOTING.md
- Contributing: CONTRIBUTING.md

plugins:
- search

markdown_extensions:
- admonition
- codehilite
- pymdownx.superfences
MKDOCS_CONFIG

- name: Create index.md from README
- name: Prepare documentation sources
run: |
mkdir -p docs
cp README.md docs/index.md
cp CONTRIBUTING.md docs/CONTRIBUTING.md
cp SECURITY.md docs/SECURITY.md
cp WORKFLOW_STATUS.md docs/WORKFLOW_STATUS.md
python - <<'PY'
from pathlib import Path

replacements = {
"docs/USAGE.md": "USAGE.md",
"docs/CONFIGURATION.md": "CONFIGURATION.md",
"docs/ARCHITECTURE.md": "ARCHITECTURE.md",
"docs/EXAMPLES.md": "EXAMPLES.md",
"docs/TROUBLESHOOTING.md": "TROUBLESHOOTING.md",
"(LICENSE)": "(https://github.com/GizzZmo/Ai_shell/blob/main/LICENSE)",
}

for relative_path, extra_replacements in {
"docs/index.md": replacements,
"docs/EXAMPLES.md": {"../CONTRIBUTING.md": "CONTRIBUTING.md"},
}.items():
path = Path(relative_path)
content = path.read_text(encoding="utf-8")
for old, new in extra_replacements.items():
content = content.replace(old, new)
path.write_text(content, encoding="utf-8")
PY

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

- name: Setup Pages
uses: actions/configure-pages@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ jobs:
statusReport += `- [📋 All Workflows](${baseUrl}/actions)\n`;
statusReport += `- [🐛 Report Issues](${baseUrl}/issues/new/choose)\n`;
statusReport += `- [💡 Discussions](${baseUrl}/discussions)\n`;
statusReport += `- [📖 Documentation](${baseUrl}/blob/main/README.md)\n`;
const pagesUrl = `https://${context.repo.owner.toLowerCase()}.github.io/${context.repo.repo}/`;
statusReport += `- [📖 Documentation](${pagesUrl})\n`;
statusReport += `- [🤝 Contributing](${baseUrl}/blob/main/CONTRIBUTING.md)\n\n`;

statusReport += '---\n';
Expand Down
2 changes: 1 addition & 1 deletion WORKFLOW_STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
- [📋 All Workflows](https://github.com/GizzZmo/Ai_shell/actions)
- [🐛 Report Issues](https://github.com/GizzZmo/Ai_shell/issues/new/choose)
- [💡 Discussions](https://github.com/GizzZmo/Ai_shell/discussions)
- [📖 Documentation](https://github.com/GizzZmo/Ai_shell/blob/main/README.md)
- [📖 Documentation](https://gizzzmo.github.io/Ai_shell/)
- [🤝 Contributing](https://github.com/GizzZmo/Ai_shell/blob/main/CONTRIBUTING.md)

---
Expand Down
48 changes: 48 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
site_name: AI Shell Documentation
site_description: An intelligent, multi-modal command-line assistant
site_url: https://gizzzmo.github.io/Ai_shell/
repo_url: https://github.com/GizzZmo/Ai_shell
repo_name: GizzZmo/Ai_shell
docs_dir: docs

theme:
name: material
palette:
- scheme: default
primary: blue
accent: blue
toggle:
icon: material/brightness-7
name: Switch to dark mode
- scheme: slate
primary: blue
accent: blue
toggle:
icon: material/brightness-4
name: Switch to light mode
features:
- navigation.tabs
- navigation.sections
- navigation.top
- search.highlight
- content.code.copy

nav:
- Home: index.md
- Usage: USAGE.md
- Configuration: CONFIGURATION.md
- Architecture: ARCHITECTURE.md
- Examples: EXAMPLES.md
- Plugins: PLUGINS.md
- Troubleshooting: TROUBLESHOOTING.md
- Contributing: CONTRIBUTING.md
- Security: SECURITY.md
- Workflow Status: WORKFLOW_STATUS.md

plugins:
- search

markdown_extensions:
- admonition
- codehilite
- pymdownx.superfences
Loading