Move docs workflow into Justfile + container#1654
Conversation
There was a problem hiding this comment.
Code Review
This pull request successfully moves the documentation build process into a container managed by a Justfile, which is a great step towards reproducible builds and a better local development experience. My review includes a few suggestions to further improve the local development workflow and optimize the new Dockerfile for size and robustness.
| mdbook-serve: build-mdbook | ||
| #!/bin/bash | ||
| set -xeuo pipefail | ||
| podman run --init --replace -d --name bootc-mdbook --rm --publish 127.0.0.1::8000 localhost/bootc-mdbook |
There was a problem hiding this comment.
The mdbook-serve recipe is great for local development. However, as it is currently written, it doesn't mount the local source code into the container. This means that mdbook serve's live-reloading feature won't work for changes made on the host. To provide a better local development experience, consider mounting the docs directory into the container. This will allow mdbook to watch for file changes and automatically rebuild the documentation.
Note the :Z flag is added for SELinux compatibility, which is good practice when using Podman.
podman run --init --replace -d --name bootc-mdbook --rm --publish 127.0.0.1::8000 -v ./docs:/src:Z localhost/bootc-mdbook
There was a problem hiding this comment.
Yeah, I may change this later
b4674f5 to
e20e09e
Compare
This drains nontrivial logic out GHA and into something isolated via containers and driven via `Justfile` and easily replicable locally too. Signed-off-by: Colin Walters <walters@verbum.org>
e20e09e to
64ca0a0
Compare
This drains nontrivial logic out GHA and into something isolated via containers and driven via
Justfileand easily replicable locally too.