mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
remove redundant summary check job from documentation check workflow
This commit is contained in:
parent
246c5e544c
commit
10d0b03bca
35
.github/workflows/check-documentation.yml
vendored
35
.github/workflows/check-documentation.yml
vendored
@ -23,41 +23,6 @@ jobs:
|
||||
filters: .github/file-filters.yml
|
||||
list-files: shell
|
||||
|
||||
check-summary:
|
||||
name: Check documentation summary
|
||||
if: needs.files-changed.outputs.markdown-files == 'true'
|
||||
needs: files-changed
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Check, if all .md files listed in SUMMARY.md exist in current branch
|
||||
run: |
|
||||
if [ ! -f "SUMMARY.md" ]; then
|
||||
echo "The file SUMMARY.md does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
md_files=$(grep -o -P '\[[^\]]+\]\(([^)]+\.md)\)' SUMMARY.md | sed -r 's/.*\(([^)]+)\)/\1/')
|
||||
missing_files=()
|
||||
|
||||
for file in $md_files; do
|
||||
if [ ! -f "$file" ]; then
|
||||
missing_files+=("$file")
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${#missing_files[@]} -eq 0 ]; then
|
||||
echo "All .md files listed in SUMMARY.dm exist."
|
||||
else
|
||||
echo "These files listed in SUMMARY.dm do not exist:"
|
||||
for missing_file in "${missing_files[@]}"; do
|
||||
echo "$missing_file"
|
||||
done
|
||||
exit 1
|
||||
fi
|
||||
|
||||
check-markdown-links:
|
||||
name: Check Markdown links
|
||||
if: needs.files-changed.outputs.markdown-files == 'true'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user