improve script to handle file list #4
This file contains hidden or 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: Main Branch Checks | |
on: | |
push: | |
branches-ignore: | |
- 'main' | |
- 'docs' | |
jobs: | |
verify-documentation-links: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Verify documentation files and links | |
# check if the files exists in the repository. The file list is in utils/doc-links.txt. | |
run: | | |
missing=0 | |
while read -r file; do | |
if [ ! -f "$file" ]; then | |
if [ $missing -eq 0 ]; then | |
echo "❌ Missing files referenced in AWS documentation:" | |
missing=$((missing + 1)) | |
fi | |
echo " - $file" | |
fi | |
done < utils/doc-links.txt | |
if [ $missing -ge 1 ]; then | |
exit 1 | |
else | |
echo "✅ All documentation-referenced files exist" | |
fi |