zigbee2mqtt-chart icon indicating copy to clipboard operation
zigbee2mqtt-chart copied to clipboard

Add make docs in CI and check no diffs

Open jlpedrosa opened this issue 10 months ago • 4 comments

We need to generate the helm docs in CI and fail the build if it has generated changes.

jlpedrosa avatar Mar 12 '25 22:03 jlpedrosa

Instead of failing a release, would it be better to just have a CI that runs on the opening of a PR and automatically updates/pushes the doc changes?

Appears there's already an action which can be utilised: https://github.com/marketplace/actions/helm-docs-github-action

niccrane avatar Mar 16 '25 22:03 niccrane

It creates a weird flow for the developer?, suddenly your branch is updated by CI... you can't push without pull. IDK, feels very anti-intuitive to me.

It seems they also supports this behaviour with fail-on-diff.

For pull requests from a forked repo to the base repo, git-push will fail to push to the forked repo, unless you pass Personal access tokens of the forked repo owners to the base repo and map them to head.repo. Consider using fail-on-diff: true in this case.

If we don't generate deltas and we can run it in the "developer pc" SGTM. What do you think?

jlpedrosa avatar Mar 16 '25 23:03 jlpedrosa

Good point!

I agree, utilise the fail on diff and make that workflow a requirement for the merging of the PR. This should mean we avoid failing the release and catch the issue at the earliest point.

niccrane avatar Mar 17 '25 12:03 niccrane

Having a little play with this here - #41

niccrane avatar Mar 17 '25 19:03 niccrane