docs: Simplify documentation site configuration and deployment

- Streamline MkDocs navigation structure
- Reduce complexity in GitHub Actions documentation workflow
- Update documentation dependencies and requirements
- Simplify site name and deployment configuration
This commit is contained in:
jango-blockchained
2025-02-05 23:29:50 +01:00
parent 039f6890a7
commit 4306a6866f
3 changed files with 18 additions and 61 deletions

View File

@@ -1,62 +1,26 @@
name: Deploy MkDocs
name: Deploy Documentation
on:
push:
branches:
- main
- master
workflow_dispatch: # Allow manual trigger
permissions:
contents: write
paths:
- 'docs/**'
- 'mkdocs.yml'
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip' # Enable pip caching
- name: Cache MkDocs dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Check links
run: |
mkdocs build --strict
- name: Test build
run: |
mkdocs build
if [ ! -d "site" ]; then
echo "Build failed - site directory not created"
exit 1
fi
- name: Deploy
cache: 'pip'
- run: pip install -r docs/requirements.txt
- name: Deploy Documentation
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
- name: Verify deployment
run: |
# Wait for GitHub Pages to update
sleep 30
# Check if the site is accessible
curl -s -f -o /dev/null "https://jango-blockchained.github.io/advanced-homeassistant-mcp" || exit 1
mkdocs gh-deploy --force