Skip to content

Update index.md

Update index.md #18

name: Update README with Markdown Links
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
update-readme:
runs-on: ubuntu-latest
permissions:
contents: write
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' index.md > temp_index.md
mv temp_index.md index.md
- name: commit
run: |
git config --global user.email [email protected]
git config --global user.name ccbaumler
git add .
git commit -m "README update Automation" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}