docs: add workflow to auto update docs #24
Workflow file for this run
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: CI | |
on: [pull_request] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- run: npm install -g markdown-toc | |
- run: sudo apt-get update && sudo apt-get -y install make git | |
- run: make toc | |
- run: git diff | |
- run: | | |
if [ -z "$(git status --porcelain)" ]; then | |
echo "No changes" | |
else | |
echo "Please update the table of contents with make toc" | |
exit 1 | |
fi |