Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f74154d96f | ||
|
|
36d83e0a0e | ||
|
|
33defac76c | ||
|
|
4306a6866f | ||
|
|
039f6890a7 |
34
.github/workflows/deploy-docs.yml
vendored
34
.github/workflows/deploy-docs.yml
vendored
@@ -1,38 +1,34 @@
|
|||||||
name: Deploy MkDocs
|
name: Deploy Documentation
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main # or master, depending on your default branch
|
- main
|
||||||
workflow_dispatch:
|
paths:
|
||||||
|
- 'docs/**'
|
||||||
permissions:
|
- 'mkdocs.yml'
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
|
cache: 'pip'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install mkdocs-material
|
python -m pip install --upgrade pip
|
||||||
pip install mkdocs-git-revision-date-localized-plugin
|
pip install -r docs/requirements.txt
|
||||||
pip install mkdocstrings[python]
|
|
||||||
- name: Configure Git
|
- name: Configure Git
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "github-actions[bot]"
|
git config --global user.name "github-actions[bot]"
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
- name: Build docs
|
- name: Build and Deploy
|
||||||
run: mkdocs build
|
|
||||||
- name: Deploy to GitHub Pages
|
|
||||||
run: |
|
run: |
|
||||||
git checkout --orphan gh-pages
|
mkdocs build --strict
|
||||||
git rm -rf .
|
mkdocs gh-deploy --force --clean
|
||||||
mv site/* .
|
|
||||||
rm -rf site
|
|
||||||
git add .
|
|
||||||
git commit -m "docs: Update documentation"
|
|
||||||
git push origin gh-pages --force
|
|
||||||
32
.github/workflows/docs-deploy.yml
vendored
32
.github/workflows/docs-deploy.yml
vendored
@@ -1,32 +0,0 @@
|
|||||||
name: Deploy Documentation
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- 'docs/**'
|
|
||||||
- 'mkdocs.yml'
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy-docs:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: 3.x
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
pip install mkdocs-material
|
|
||||||
pip install mkdocs
|
|
||||||
|
|
||||||
- name: Deploy documentation
|
|
||||||
run: mkdocs gh-deploy --force
|
|
||||||
38
docs/.github/workflows/deploy-docs.yml
vendored
38
docs/.github/workflows/deploy-docs.yml
vendored
@@ -1,38 +0,0 @@
|
|||||||
name: Deploy MkDocs
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.x'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install mkdocs-material
|
|
||||||
pip install mkdocs-minify-plugin
|
|
||||||
pip install mkdocs-git-revision-date-plugin
|
|
||||||
pip install mkdocs-mkdocstrings
|
|
||||||
pip install mkdocs-social-plugin
|
|
||||||
pip install mkdocs-redirects
|
|
||||||
|
|
||||||
- name: Deploy
|
|
||||||
run: |
|
|
||||||
git config --global user.name "github-actions[bot]"
|
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
mkdocs gh-deploy --force
|
|
||||||
@@ -14,7 +14,7 @@ The documentation is automatically deployed when changes are pushed to the `main
|
|||||||
|
|
||||||
### GitHub Actions Workflow
|
### GitHub Actions Workflow
|
||||||
|
|
||||||
The deployment is handled by the workflow in `.github/workflows/deploy-docs.yml`:
|
The deployment is handled by the workflow in `.github/workflows/deploy-docs.yml`. This is the single source of truth for documentation deployment:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: Deploy MkDocs
|
name: Deploy MkDocs
|
||||||
@@ -23,6 +23,7 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- master
|
- master
|
||||||
|
workflow_dispatch: # Allow manual trigger
|
||||||
```
|
```
|
||||||
|
|
||||||
## Manual Deployment
|
## Manual Deployment
|
||||||
@@ -30,9 +31,18 @@ on:
|
|||||||
If needed, you can deploy manually using:
|
If needed, you can deploy manually using:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Create a virtual environment
|
||||||
|
python -m venv venv
|
||||||
|
|
||||||
|
# Activate the virtual environment
|
||||||
|
source venv/bin/activate
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
pip install -r docs/requirements.txt
|
pip install -r docs/requirements.txt
|
||||||
|
|
||||||
|
# Build the documentation
|
||||||
|
mkdocs build
|
||||||
|
|
||||||
# Deploy to GitHub Pages
|
# Deploy to GitHub Pages
|
||||||
mkdocs gh-deploy --force
|
mkdocs gh-deploy --force
|
||||||
```
|
```
|
||||||
@@ -101,3 +111,31 @@ mkdocs-redirects
|
|||||||
- Check [GitHub Pages settings](https://github.com/jango-blockchained/advanced-homeassistant-mcp/settings/pages)
|
- Check [GitHub Pages settings](https://github.com/jango-blockchained/advanced-homeassistant-mcp/settings/pages)
|
||||||
- Monitor build status in Actions tab
|
- Monitor build status in Actions tab
|
||||||
- Verify site accessibility
|
- Verify site accessibility
|
||||||
|
|
||||||
|
## Workflow Features
|
||||||
|
|
||||||
|
### Caching
|
||||||
|
The workflow implements caching for Python dependencies to speed up deployments:
|
||||||
|
- Pip cache for Python packages
|
||||||
|
- MkDocs dependencies cache
|
||||||
|
|
||||||
|
### Deployment Checks
|
||||||
|
Several checks are performed during deployment:
|
||||||
|
1. Link validation with `mkdocs build --strict`
|
||||||
|
2. Build verification
|
||||||
|
3. Post-deployment site accessibility check
|
||||||
|
|
||||||
|
### Manual Triggers
|
||||||
|
You can manually trigger deployments using the "workflow_dispatch" event in GitHub Actions.
|
||||||
|
|
||||||
|
## Cleanup
|
||||||
|
|
||||||
|
To clean up duplicate workflow files, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Make the script executable
|
||||||
|
chmod +x scripts/cleanup-workflows.sh
|
||||||
|
|
||||||
|
# Run the cleanup script
|
||||||
|
./scripts/cleanup-workflows.sh
|
||||||
|
```
|
||||||
@@ -1 +1,12 @@
|
|||||||
|
mkdocs>=1.5.0
|
||||||
|
mkdocs-material>=9.0.0
|
||||||
|
mkdocs-minify-plugin>=0.7.1
|
||||||
|
mkdocs-git-revision-date-plugin>=0.3.2
|
||||||
|
mkdocstrings>=0.24.0
|
||||||
|
mkdocstrings-python>=1.0.0
|
||||||
|
mkdocs-social-plugin==0.1.0
|
||||||
|
mkdocs-redirects>=1.2.1
|
||||||
|
mkdocs-glightbox>=0.3.4
|
||||||
|
pillow>=10.0.0
|
||||||
|
cairosvg>=2.7.0
|
||||||
|
pymdown-extensions>=10.0
|
||||||
49
mkdocs.yml
49
mkdocs.yml
@@ -1,11 +1,23 @@
|
|||||||
site_name: Advanced Home Assistant MCP
|
site_name: MCP Server for Home Assistant
|
||||||
site_url: https://jango-blockchained.github.io/advanced-homeassistant-mcp
|
site_url: https://jango-blockchained.github.io/advanced-homeassistant-mcp
|
||||||
repo_url: https://github.com/jango-blockchained/advanced-homeassistant-mcp
|
repo_url: https://github.com/jango-blockchained/advanced-homeassistant-mcp
|
||||||
|
site_description: Home Assistant MCP Server Documentation
|
||||||
|
# Add this to handle GitHub Pages serving from a subdirectory
|
||||||
|
site_dir: site/advanced-homeassistant-mcp
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
logo: assets/images/logo.png
|
logo: assets/images/logo.png
|
||||||
favicon: assets/images/favicon.ico
|
favicon: assets/images/favicon.ico
|
||||||
|
features:
|
||||||
|
- navigation.instant
|
||||||
|
- navigation.tracking
|
||||||
|
- navigation.sections
|
||||||
|
- navigation.expand
|
||||||
|
- navigation.top
|
||||||
|
- search.suggest
|
||||||
|
- search.highlight
|
||||||
|
- content.code.copy
|
||||||
palette:
|
palette:
|
||||||
- scheme: default
|
- scheme: default
|
||||||
primary: indigo
|
primary: indigo
|
||||||
@@ -19,18 +31,6 @@ theme:
|
|||||||
toggle:
|
toggle:
|
||||||
icon: material/brightness-4
|
icon: material/brightness-4
|
||||||
name: Switch to light mode
|
name: Switch to light mode
|
||||||
features:
|
|
||||||
- navigation.instant
|
|
||||||
- navigation.tracking
|
|
||||||
- navigation.sections
|
|
||||||
- navigation.expand
|
|
||||||
- navigation.top
|
|
||||||
- search.suggest
|
|
||||||
- search.highlight
|
|
||||||
- content.code.copy
|
|
||||||
- content.tabs.link
|
|
||||||
- content.tooltips
|
|
||||||
- toc.integrate
|
|
||||||
|
|
||||||
markdown_extensions:
|
markdown_extensions:
|
||||||
- pymdownx.highlight:
|
- pymdownx.highlight:
|
||||||
@@ -51,31 +51,24 @@ plugins:
|
|||||||
- search
|
- search
|
||||||
- minify:
|
- minify:
|
||||||
minify_html: true
|
minify_html: true
|
||||||
- git-revision-date
|
- git-revision-date-plugin
|
||||||
- mkdocstrings:
|
- mkdocstrings
|
||||||
default_handler: python
|
- social:
|
||||||
- social
|
cards: false # Disable social cards if they cause issues
|
||||||
- tags
|
- tags
|
||||||
- redirects
|
- redirects
|
||||||
- gh-deploy
|
- gh-deploy
|
||||||
|
|
||||||
nav:
|
nav:
|
||||||
- Home: index.md
|
- Home: index.md
|
||||||
|
- Getting Started:
|
||||||
|
- Installation: getting-started/installation.md
|
||||||
|
- Quick Start: getting-started/quickstart.md
|
||||||
|
- API Reference: api/index.md
|
||||||
- Usage: usage.md
|
- Usage: usage.md
|
||||||
- Configuration:
|
- Configuration:
|
||||||
- Claude Desktop Config: claude_desktop_config.md
|
- Claude Desktop Config: claude_desktop_config.md
|
||||||
- Client Config: client_config.md
|
- Client Config: client_config.md
|
||||||
- Getting Started:
|
|
||||||
- Overview: getting-started/index.md
|
|
||||||
- Installation: getting-started/installation.md
|
|
||||||
- Configuration: getting-started/configuration.md
|
|
||||||
- Docker Setup: getting-started/docker.md
|
|
||||||
- Quick Start: getting-started/quickstart.md
|
|
||||||
- API Reference:
|
|
||||||
- Overview: api/index.md
|
|
||||||
- Core API: api/core-api.md
|
|
||||||
- SSE API: api/sse.md
|
|
||||||
- Core Functions: api/core.md
|
|
||||||
- Tools:
|
- Tools:
|
||||||
- Overview: tools/tools.md
|
- Overview: tools/tools.md
|
||||||
- Device Management:
|
- Device Management:
|
||||||
|
|||||||
Reference in New Issue
Block a user