feature: Add dependency explorer documentation TAROT-2953 #2285
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deleted files | |
on: | |
pull_request: | |
branches: | |
master | |
jobs: | |
list-deleted-files: | |
runs-on: ubuntu-latest | |
name: Detect deleted files | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get changed docs md files | |
id: changed-files | |
uses: tj-actions/changed-files@v45 | |
with: | |
files: docs/**/*.md | |
- name: Format list of deleted files | |
id: format-output | |
env: | |
ORIGINAL_DELETED: '${{ steps.changed-files.outputs.deleted_files }}' | |
ORIGINAL_RENAMED: '${{ steps.changed-files.outputs.renamed_files }}' | |
run: | | |
echo "FORMATTED_DELETED=$(echo $ORIGINAL_DELETED | sed 's/ /`<br>`/g')" >> $GITHUB_OUTPUT | |
echo "FORMATTED_RENAMED=$(echo $ORIGINAL_RENAMED | sed 's/ /`<br>`/g')" >> $GITHUB_OUTPUT | |
- name: Comment PR if there are deleted files | |
if: steps.changed-files.outputs.any_deleted == 'true' | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
message: | | |
## Remember to add redirects | |
${{ steps.format-output.outputs.FORMATTED_DELETED != '' && format('This PR **deletes** one or more `md` files:<br>`{0}`<br>', steps.format-output.outputs.FORMATTED_DELETED) || '' }} | |
${{ steps.format-output.outputs.FORMATTED_RENAMED != '' && format('This PR **renames** one or more `md` files:<br>`{0}`<br>', steps.format-output.outputs.FORMATTED_RENAMED) || '' }} | |
Remember to append the appropriate redirects in `mkdocs.yml` under `plugins.redirects.redirect_maps`. | |
comment_tag: deleted-files-reminder |