Update Readme #11
This file contains hidden or 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 | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "30 0 * * *" | |
| jobs: | |
| update-followers: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Update followers list | |
| run: | | |
| cd scripts && npm install && ACCESS_TOKEN=${{ secrets.ACCESS_TOKEN }} npm run get:followers | |
| - name: Update Blog Posts | |
| run: | | |
| cd scripts && npm install && ACCESS_TOKEN=${{ secrets.ACCESS_TOKEN }} npm run get:posts | |
| - name: Commit changes | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add -A | |
| git diff-index --quiet HEAD || git commit -m "Updated README.md" | |
| - name: Pull changes | |
| run: git pull -r | |
| - name: Push changes | |
| uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df | |
| with: | |
| ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} |