Skip to content

Update update_readme.yaml #5

Update update_readme.yaml

Update update_readme.yaml #5

name: Update README with Markdown Links
on:
push:
branches:
- main
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Extract Markdown links and update README
run: |
find docs -type f -name "*.md" -exec awk -v RS= '{gsub(/\n/, " "); print "[" FILENAME "](" FILENAME ")"}' {} \; > links.txt
awk 'BEGIN{p=1} /^## Notes/{print "## Notes"; system("cat links.txt"); p=0} p' README.md > temp_readme.md
mv temp_readme.md README.md
- name: Commit and push changes
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add README.md
git commit -m "Update README with documentation links"
git push