ansible-community / github-docs-build

GitHub actions and workflows for building Ansible collection documentation.
GNU General Public License v3.0
10 stars 6 forks source link

Add a validate job to the workflows #33

Open briantist opened 2 years ago

briantist commented 2 years ago

With #27 , we have some control over how strict the build is.

The way I see it, there should be a build that has the strictest settings, for validation, while builds for publishing (especially in PRs) should use the most lenient options, to give us the best chance of a publishable build (even if some pages have errors), because that's more useful for checking rendered output and comparing changes.

By using separate jobs, we can get published docs whenever possible, while still having the validate job "fail" the CI until all errors/warnings are fixed.

Currently using this pattern in community.hashi_vault and lowlydba.sqlserver, but it could use support here to avoid having to repeat some things.

In the push workflows, we can achieve this with the push reusable workflow already, with caveats:

In PR, the only reason we can't use the push reusable workflow is because it has no way to specify the ref, so:

Last point leads to the idea of:

briantist commented 2 years ago

45 makes this possible. At the moment, it's still on the choice of the consumer to do it. We can add it so samples.

On the fence still whether we should build it into the workflows or not. Or have more workflow (some with some without).

I think better to keep this open and revisit once I can propose an actual change to build.sh.