Skip to content

Commit 40209ac

Browse files
Ignore .js and .inv files for diff (#16)
* Delete unnecessary files. * Actually use action from this branch. Needs to be reverted before merging. * Add missing tags. * Add brackets. * Update actions/ansible-docs-build-diff/action.yml Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com> * Revert "Actually use action from this branch. Needs to be reverted before merging." This reverts commit 56a093b. Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
1 parent 760b408 commit 40209ac

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

actions/ansible-docs-build-diff/action.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
name: Calculate diff output between two Ansible docs builds
3-
description: Compare two builds of docs (HTML files) and produce diff output.
3+
description: |
4+
Compare two builds of docs (HTML files) and produce diff output.
5+
6+
Please note that the input directories might be modified, as some files will be deleted.
47
inputs:
58
build-html-a:
69
description: The path to the HTML files (set A).
@@ -75,6 +78,17 @@ outputs:
7578
runs:
7679
using: composite
7780
steps:
81+
- name: Delete files that should not be included in the diff
82+
id: delete
83+
shell: bash
84+
run: |
85+
echo "::group::Deleting files from ${{ inputs.build-html-a }}"
86+
find "${{ inputs.build-html-a }}" \( -name '*.js' -or -name '*.inv' \) -delete -print
87+
echo "::endgroup::"
88+
echo "::group::Deleting files from ${{ inputs.build-html-b }}"
89+
find "${{ inputs.build-html-b }}" \( -name '*.js' -or -name '*.inv' \) -delete -print
90+
echo "::endgroup::"
91+
7892
- name: Create diff
7993
id: diff
8094
uses: actions/github-script@v5

0 commit comments

Comments
 (0)