Better alt text #19
This file contains 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: Update README table of contents | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- README.md | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v2 | |
- name: Update TOC | |
run: npx markdown-toc README.md -i | |
- name: Commit and push if README changed | |
run: |- | |
git diff | |
git config --global user.email "[email protected]" | |
git config --global user.name "README-bot" | |
git diff --quiet || (git add README.md && git commit -m "Updated README") | |
git push |