Fix the Moore CI docs pipeline
Cherry-picked the relevant commits from !3422 (merged) as requested by @jonrob.
With help from @jonrob and @clemenci, I've modified the .gitlab-ci.yml
configuration so that the pipeline can work out what branch is being targeted and also to which nightly build slot that would correspond.
The latter should fix the docs again and keep them alive on all protected branches (they were hard-coded to look at lhcb-master
, but of course we're working on 2024-patches
and the two have diverged).
The former should speed up the formatting check, as currently it is checking every file that differs between the branch and master
for correct formatting - now it should just check only those that differ w.r.t the given target branch.