Merge branch 'master' of [email protected]:chadlavi/recipes.git #273
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.md when files change | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- "README.md" | |
- "index.md" | |
- ".github/*" | |
- "_layouts/*" | |
- "assets/*" | |
- "_utils/*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Auto-fix fractions | |
run: ./_utils/replace-fractions-ci.sh | |
- name: Update README.md | |
run: ./_utils/indexer.sh > README.md | |
- name: Commit files | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Chad Lavimoniere (CI)" | |
if [ "$(git status --porcelain)" ]; then | |
git commit -am "$(echo "Update $(git status --porcelain | sed 's/^.*\///g' | tr '\n' ' ')")" | |
fi | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |