test github actions #1
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: Generate Verslagen Index | |
on: | |
push: | |
paths: | |
- 'docs/verslagen/**' | |
jobs: | |
generate_index: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Generate Index | |
run: | | |
cd docs/verslagen | |
echo "# Verslagen" > index.md | |
echo "" >> index.md | |
for dir in */; do | |
dir=${dir%*/} | |
if [ -d "$dir" ]; then | |
echo "## $dir" >> index.md | |
find "$dir" -type f -printf "- [%f](%p)\n" | sort >> index.md | |
echo "" >> index.md | |
fi | |
done | |
- name: Commit changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add docs/index.md | |
git commit -m "Update index.md" || echo "No changes to commit" |