Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion actions/ansible-docs-build-init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,20 @@ runs:
echo "::group::Create small RST file for link"
mkdir -p "${{ inputs.dest-dir }}/rst"
echo ":orphan:" > "${{ inputs.dest-dir }}/rst/_targets.rst"
echo "" >> "${{ inputs.dest-dir }}/rst/_targets.rst"
while read -r line; do
echo ".. _${line}:" >> "${{ inputs.dest-dir }}/rst/_targets.rst"
if [ "${line}" != "" ]; then
echo ".. _${line}:" >> "${{ inputs.dest-dir }}/rst/_targets.rst"
fi
done <<< "${_INPUT_PROVIDE_LINK_TARGETS}"
echo "" >> "${{ inputs.dest-dir }}/rst/_targets.rst"
echo "Replacement stub for existing reference" >> "${{ inputs.dest-dir }}/rst/_targets.rst"
echo "=======================================" >> "${{ inputs.dest-dir }}/rst/_targets.rst"
echo "" >> "${{ inputs.dest-dir }}/rst/_targets.rst"
echo "This file just exists to provide link targets. Please ignore it." >> "${{ inputs.dest-dir }}/rst/_targets.rst"
echo "Content of ${{ inputs.dest-dir }}/rst/_targets.rst:"
echo ""
cat "${{ inputs.dest-dir }}/rst/_targets.rst"
echo "::endgroup::"
fi

Expand Down