[RFC] Set up OCaml - Extends

I was a bit surprised to see that many users were not using setup-ocaml and GitHub Actions to publish odoc to GitHub Pages, even though it was not so hard. So I’m trying to publish some extends in the setup-ocaml repository but I’d like to see how the community actually thinks about this.

The early ones are the following extends:

  • deploy-doc
    • Deploy odoc to GitHub Pages
  • lint-doc
    • Check if your doc comments are error-and-warning-free
  • lint-fmt
    • Check if your files are well-formatted
  • lint-opam
    • Check if your dune and opam dependencies are consistent

Except for deploy-doc, all extends allow us to do the same thing with just copy and paste on GitHub Actions that the CI infrastructure called ocaml-ci, which we are currently using in the Mirage project, etc.


At this stage, deploy-doc does not yet support cross-reference document generation, but if the community really wants it, we can hack on our side to make it simple for users to use them, until we implement support on the dune side.

Wouldn’t it be easier to wait a bit for the v3 site? And arguably a little better since it will be a consolidated source of API docs.

Is there an example of such step? i.e. publishing ocaml docs to github pages when using setup-ocaml?

Fair enough. But it’s a bit better in terms of giving you more control. For example, always generate a document with the latest commit, and/or lint is just helpful for finding document errors.

You can check that here. It’s actually possible to do just with deploy-doc, but each project requires a different OCaml compiler constraint, so it’s set up as a different action.