The documentation jobs have a per branch filter since we usually only care about the master branch. They are triggered via the postmerge pipeline which reacts to Gerrit change-merged events. It carries the branch and it works fine.
I would like to reuse the exact same job when a tag is published. That is done via the publish pipeline which reacts to Gerrit ref-updated events matching ^refs/tags/.*$. In such a case, the branch: filter applied to the job will end up discarding the event, we thus need to additionally allow tags for all publish jobs.
Looking at Zuul source code https://review.openstack.org/14096 ) the branch filter attempt to match the event branch and fallback to the ref. It lacked documentation so I proposed a doc amendement to upstream: https://review.openstack.org/#/c/137130/
We thus need to apply to all publish jobs:
branch: ^(master|refs/tags/.*)$
Might want to add a wildcard for REL* branches later on.