Create sveltekit-sync.md #176
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 new TIL is added. | |
on: | |
push: | |
branches: [master] | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- run: | | |
"${GITHUB_WORKSPACE}/update-readme.sh" | |
# Push changes | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add README.md | |
git add feed.json | |
git diff-index --quiet HEAD || git commit -m "Update TIL listing" | |
git push | |
curl -X POST -d {} https://api.netlify.com/build_hooks/${{ secrets.NETLIFY_BUILD_HOOK_ID }} | |