Deployment
Viewing Locally
Method 1: Direct File Access
# Windows
start build\html\index.html
# macOS
open build/html/index.html
# Linux
firefox build/html/index.html
Method 2: Python HTTP Server
python -m http.server 8000 --directory build/html
Visit: http://localhost:8000
Method 3: Live Server (VS Code)
Install “Live Server” extension in VS Code
Right-click
build/html/index.htmlSelect “Open with Live Server”
Production Deployment
Option 1: Web Server (Nginx/Apache)
Copy the build/html/ directory to your web server:
# Nginx
cp -r build/html/* /var/www/html/docs/
# Apache
cp -r build/html/* /var/www/html/docs/
Option 2: GitHub Pages
# Push to gh-pages branch
git add build/html/
git commit -m "Update documentation"
git subtree push --prefix build/html origin gh-pages
Option 3: Read the Docs
Push your repository to GitHub
Sign up at readthedocs.org
Connect your repository
Automatic builds on each push
Option 4: Docker
Create Dockerfile:
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
RUN make html
EXPOSE 8000
CMD ["python", "-m", "http.server", "8000", "--directory", "build/html"]
Build and run:
docker build -t api-docs .
docker run -p 8000:8000 api-docs
Best Practices
Always build locally before deploying
Test in all supported browsers
Verify mobile responsiveness
Check all links are working
Test language switching functionality