coq / bot

A (Coq Development Team) bot written in OCaml
MIT License
23 stars 14 forks source link

Add generated HTML documentation to gh-pages branch for tags #85

Open palmskog opened 4 years ago

palmskog commented 4 years ago

It's currently a considerably manual chore to generate HTML documentation for Coq project releases and commit it to the gh-pages branch of a repo. This is something that coqbot could automate.

As one recent example of how to automate this, we used Jenkins to generate coqdoc for every commit for a Coq project, see this commit.

Zimmi48 commented 4 years ago

@palmskog Could you specify more clearly what is the expected workflow for generating and committing this documentation? AFAICT it is not documented anywhere in the templates repository and people have been quite inconsistent in their use of the generated index.md.

palmskog commented 4 years ago

I think the workflow is quite well specified in the commit I referenced. However, I can recapitulate briefly:

Zimmi48 commented 4 years ago

I wonder if this case wouldn't be better served (at least partially) by a GitHub Action because of the need to compile the documentation using the right set of dependencies. What about making a feature request to https://github.com/coq-community/docker-coq-action (cc @erikmd) so that:

  1. docs are built using coqdoc/coq2html
  2. docs are deployed as an artifact

Then, as a second step, the workflow can send a request to a new coqbot endpoint to retrieve the artifact and copy them to the right location, update the symlink and push to the gh-pages branch. This second step could alternatively be taken care of directly inside the workflow using custom scripts or dedicated Actions (such as https://github.com/marketplace/actions/push-git-subdirectory-as-branch, but this action will override the whole content of the gh-pages branch, so one would have to first prepare the exact content that needs to be pushed).

palmskog commented 4 years ago

I'm willing to work on this issue, for example during CUDW this year, but I'm going to need quite a few pointers how we should handle the GitHub Actions part. It sounds like we have to do some kind of specialized GitHub action that relies on Docker-Coq-Action.

Zimmi48 commented 4 years ago

I'm not sure that creating Actions that depend on others is really supported. But adding specific optional features to the main Docker-Coq-Action wouldn't be a problem, I think...