Skip to content

Update notes-template.md #30

Update notes-template.md

Update notes-template.md #30

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" > links.txt
awk -F/ '{gsub(/\.md$/, ""); gsub(/ /, "\\ "); printf "[%s](%s)\n", $NF, $0}' links.txt > tmp && mv tmp links.txt
awk 'BEGIN{p=1} /^## Notes/{print "## Notes"; while(getline < "links.txt") {print; print "\n"}; 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 }}