Deploy Docs to GitHub Pages
Stack
MkDocsMaterial for MkDocs- GitHub Actions (
.github/workflows/docs-pages.yml)
Local preview
Install docs dependencies:
Run docs server:
Open: http://127.0.0.1:8000
Static build
Build output:site/.
GitHub Actions deployment
- Open repository
Settings -> Pages. - In
Build and deployment, chooseSource: GitHub Actions. - Push changes to your default branch.
- Workflow builds and deploys docs automatically.
Required customization
Before first deploy, update these fields in mkdocs.yml:
- site_url
- repo_url
- repo_name