Deployment Overview
Deployment Overview
docmd compiles static documentation sites into self-contained output directories (default: site/) that require zero server-side runtimes.
npx @docmd/core build
Choosing a Deployment Method
Select a deployment pattern based on infrastructure needs:
| Strategy | Primary Use Case | Target Destination |
|---|---|---|
| Starter Template | Rapid creation of new repositories with pre-configured GitHub Actions. | GitHub Pages |
| GitHub Action | Automated CI/CD integration for existing source repositories. | GitHub Pages / Custom CI |
| Deployer CLI Tool | Automated generation of server configurations and container files. | Docker, NGINX, Caddy, Vercel, Netlify |
Starter Template
- The fastest path for standalone documentation projects. Clone the official template repository containing a default
docmd.config.json, sample pages, and a pre-configured GitHub Actions workflow for automated deployments on push. - Starter Template Guide
GitHub Action
- The
docmd-io/deployGitHub Action compiles your documentation and exposes the output directory path for downstream publishing steps. Use this to integrate docmd into existing CI/CD pipelines without modifying project file structures. - GitHub Action Guide
Deployer Tool
The deploy command parses your docmd.config.json configuration and generates production-ready configuration files tailored to your project settings, SPA routing preferences, and asset directories:
# Self-hosted infrastructure
npx @docmd/core deploy --docker # Multi-stage Dockerfile + .dockerignore
npx @docmd/core deploy --nginx # Production NGINX configuration
npx @docmd/core deploy --caddy # Caddyfile with automatic HTTPS
# Cloud & Serverless Platforms
npx @docmd/core deploy --github-pages # GitHub Actions workflow
npx @docmd/core deploy --vercel # vercel.json configuration
npx @docmd/core deploy --netlify # netlify.toml configuration
Supported Hosting Platforms
- Docker Image: Official multi-architecture image for containerised environments.
- NGINX: Self-hosted reverse proxy configuration.
- Caddy: Self-hosted web server with automatic TLS certificate management.
- Vercel: Cloud deployment configuration with static asset optimisation.
- Netlify: Git-backed continuous deployment.
- Cloudflare Pages: Edge-native static site hosting with integrated CI/CD.
- Firebase Hosting: Google CDN deployment with GitHub Actions integration.
Production Checklist
- Canonical Site URL: Specify
urlindocmd.config.jsonto generate accurate canonical tags, open graph URLs, and sitemap entries. - Path Redirects: Preserve legacy URL paths during migration using the
redirectsconfig. - Analytics Integration: Enable the
analyticsplugin to track visitor traffic and search metrics. - AI Context Files: Enable the
llmsplugin to output machine-readablellms.txtandllms-full.txtfiles.
Custom 404 Pages
docmd compiles a standalone 404.html page into your site output root. Most static hosts serve this file automatically for unmapped routes.