This repository contains documentation for Kuadrant, built using MkDocs and the mike
plugin for multi-versioning. You can run and build these docs using Docker/Podman or by installing MkDocs locally.
To run the docs using Docker, mount the current directory to the container and bind it to port 8000
:
docker run -v "$(pwd):/docs" -p 8000:8000 quay.io/kuadrant/docs.kuadrant.io:latest "mkdocs serve -s -a 0.0.0.0:8000"
This will serve the docs at http://localhost:8000.
First, install MkDocs using pip:
pip install mkdocs
Install any additional dependencies:
pip install -r requirements.txt
To serve the docs locally, run:
mkdocs serve -s
You can then view the docs at http://127.0.0.1:8000 on your current branch.
If you’d like to test the multi-versioned documentation setup locally, use mike
:
mike serve
Or, with Docker / Podman:
docker run -v "$(pwd):/docs" -p 8000:8000 quay.io/kuadrant/docs.kuadrant.io:latest "mike serve -a 0.0.0.0:8000"
This will serve the docs from the gh-pages
branch with multi-versioning. For general development, use mkdocs serve
.
For automated builds, see the GitHub Actions workflows in .github/workflows/build.yaml
and .github/workflows/manual-deploy.yaml
.
We use mike
for managing multi-versioned docs. It works by adding new commits to the gh-pages
branch each time you run mike deploy
. Older versions remain available without modification. If needed, existing versions can be re-built.
Locally:
mike list
Docker / Podman:
docker run -v "$(pwd):/docs" quay.io/kuadrant/docs.kuadrant.io:latest "mike list"
Locally:
mike deploy 0.7.0 -t "0.7.0 (dev)"
Docker / Podman:
docker run -v "$(pwd):/docs" quay.io/kuadrant/docs.kuadrant.io:latest "mike deploy 0.7.0 -t '0.7.0 (dev)'"
Locally:
mike delete 0.7.0
Docker / Podman:
docker run -v "$(pwd):/docs" quay.io/kuadrant/docs.kuadrant.io:latest "mike delete 0.7.0"
Locally:
mike serve -S
Docker / Podman:
docker run -v "$(pwd):/docs" -p 8000:8000 quay.io/kuadrant/docs.kuadrant.io:latest "mike serve -a 0.0.0.0:8000"
We use two aliases with mike
:
latest
: Points to the latest stable release (e.g.,latest -> 0.7.0
)dev
: Points toHEAD
ofmain
, for unstable or pre-release documentation
Development releases from main
will deploy to dev
as a fast channel. The latest
alias points to the most recent stable release by default.
Stable releases should be tagged (e.g., git tag 0.6.1
) for clarity.
To mark a new release as stable, follow these steps:
Note: This process is currently manual and will be automated soon.
- Create a release branch from
main
(e.g.,git checkout -b 0.7.x
). - In the release branch (
0.7.x
):- Update
mkdocs.yml
to replacebranch=
references with specific tags for all components. - Set the latest release as default in
mkdocs.yml
:extra: version: provider: mike default: - 0.7.0
- Update any other references for the new release, including
import_url
git refs and other version-specific settings.
- Update
- Deploy the release with the
latest
alias:
Locally:
mike deploy --update-aliases 0.7.0 latest
Docker / Podman:
docker run -v "$(pwd):/docs" quay.io/kuadrant/docs.kuadrant.io:latest "mike deploy --update-aliases 0.7.0 latest"
- Set this release as the default version:
Locally:
mike set-default 0.7.0
Docker / Podman:
docker run -v "$(pwd):/docs" quay.io/kuadrant/docs.kuadrant.io:latest "mike set-default 0.7.0"
- Tag the repo (e.g.,
git tag 0.7.0 && git push --tags <upstream-origin>
).
Re-releasing an existing version is generally not recommended but can be done if necessary.
To re-release a version, go to Actions > Re-deploy via mike
in GitHub and run the workflow with the desired version and source branch.
For reference:
Workflow Source | Version to Deploy | Source Branch | Notes |
---|---|---|---|
main | 0.10.0 | 0.10.0 | Latest Stable |
main | 0.8.0 | 0.8 | |
main | dev | main | Development - Unstable |
- Fetch latest changes:
git fetch --all
- Check out the release branch:
git checkout 0.7.x
- Make necessary changes and re-deploy:
Locally:
mike deploy 0.7.0 -t "0.7.0" --push
Docker / Podman:
docker run -v "$(pwd):/docs" quay.io/kuadrant/docs.kuadrant.io:latest "mike deploy 0.7.0 -t '0.7.0' --push"
- If there’s a push error, reset to the latest
gh-pages
branch and try again.
This site deploys automatically via GitHub Pages on merge to main
. To manually trigger a deployment, go to Actions > ci > Run Workflow
:
This workflow will build the documentation bundle and trigger a push to the gh-pages
branch.
To build the Docker image, run:
docker build -t quay.io/kuadrant/docs.kuadrant.io:latest .
docker push quay.io/kuadrant/docs.kuadrant.io:latest