Build documentations
This project follows the DEV.to #ActionsHackathon21 hackathon.
Use GitHub Actions and Workflows to build your documentations with MkDocs, then publish to Github Pages.
Check the complete workflow here (build-documentations.yml)
Actions used
- actions/checkout@v2 To checkout the source code from the repository
- actions/cache@v2 To cache the dependencies, allow us to re use them for future builds
Configurations
- You can config the branch which holds the documentations with
DOCUMENTATIONS_BRANCH
variable. - You can also configure the branches which you want to run this workflow, with
branches
key. - To configure the Github pages, you can go to settings > pages > Source and choose the documentation branch.
Flows
- Use actions/checkout@v2 to checkout source code from the repository
- Use actions/cache@v2 to cache dependencies (
.pip
directory) - Install dependencies with
pip
- Build documentations with Mkdocs
- Synchronize built files with deployment branch
- Push build into the deployment branch