MkDocs GitHub Pages Deployment Workflow
Chapter: 08 - Mkdocs Platform Documentation Generator: microsim-p5 Match Score: 94/100 Difficulty: Medium
Specification
Purpose: Show the complete workflow from local markdown editing to published GitHub Pages site
Visual style: Swimlane diagram with three swim lanes (Local Development, Git/GitHub, GitHub Pages)
Swimlanes:
1. Local Development
2. Git/GitHub
3. GitHub Pages Service
Steps:
Local Development Lane:
1. Start: "Edit Markdown Files"
Hover text: "Author writes content in /docs folder using text editor or IDE"
2. Process: "mkdocs serve"
Hover text: "Launch local development server on http://localhost:8000 to preview changes"
3. Process: "mkdocs build"
Hover text: "Generate static site in /site directory to verify build succeeds"
4. Decision: "Build Successful?"
Hover text: "Check for errors in markdown parsing, missing files, or broken links"
If No → return to "Edit Markdown Files"
If Yes → continue
5. Process: "git add & commit"
Hover text: "Stage markdown source files and commit with descriptive message"
Git/GitHub Lane:
6. Process: "git push origin main"
Hover text: "Upload source commits to GitHub repository main branch"
7. Process: "mkdocs gh-deploy"
Hover text: "Build site and force-push to gh-pages branch automatically"
8. Process: "GitHub receives gh-pages push"
Hover text: "GitHub detects new commits to gh-pages branch"
GitHub Pages Lane:
9. Process: "GitHub Pages Build"
Hover text: "GitHub copies files from gh-pages branch to CDN hosting infrastructure"
10. Process: "Deploy to CDN"
Hover text: "Site deployed to global CDN with HTTPS enabled"
11. End: "Site Live at username.github.io/repo-name/"
Hover text: "Documentation accessible worldwide with custom domain option"
Color coding:
- Green: Successful operations
- Blue: Build and verification steps
- Orange: Git operations
- Purple: GitHub automated processes
Annotations:
- Arrow from step 7 to step 1: "Continue development cycle"
- Note at step 7: "gh-deploy handles build + push to gh-pages automatically"
- Note at step 11: "Typical deployment time: 1-2 minutes"
Implementation: Mermaid diagram or Lucidchart-style workflow visualization