Skip to content

action_ansible docs build diff

BS[bot] edited this page Jan 16, 2022 · 3 revisions

ansible-docs-build-diff

Calculate diff output between two Ansible docs builds

Compare two builds of docs (HTML files) and produce diff output.

Please note that the input directories might be modified, as some files will be deleted.

Inputs

Name (✅required) Default Description
build-html-a The path to the HTML files (set A).
build-html-b The path to the HTML files (set B).
diff-size-limit 60000 The maximum size of the diff output. Larger output will be truncated.
sort-files true If true, sort the trimmed and rendered list of files.
render-file-line > * `$` $<path_tail> A template used to render each line of the file list as markdown. This will be processed as a JavaScript regex replace string,
and the following named capture groups can be referenced:
- $ -- the single character "status" letter in the file list, like "A" or an added file or "M" for a modified file.
- $<path_stub> -- the part of the path that will be discarded in the "trimmed" file list.
- $<path_tail> -- the relative part of the path; this can be used to concatenate to a URL to create links to the published site.

Note that literal $ characters must be escaped as $$ and literal backslashes must be escaped as \
render-diff-truncate-text The diff output was truncated because it exceeded the maximum size. Markdown text to be used if the diff text was truncated. It will be available in the render-diff template.
render-diff see action.yml for full default value A template used to render the diff output as markdown. It will be interpreted as a pseudo-JavaScript template literal and the following
variables are available for ${var} interpolation:
- ${diff} -- the diff text
- ${truncated_msg} -- empty if the diff is not truncated, otherwise the value of render-diff-truncate-text

Outputs

Name Description
diff The diff text.
truncated Will be 'true' if the output was truncated, otherwise 'false'.
files-raw The unmodified diff file list output.
files-trimmed The diff output with paths trimmed to be relative to the doc root.
files-rendered The markdown rendered file list of files.
diff-rendered The markdown rendered diff output.