Instagram Daily Sync #165
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: Instagram Daily Sync | |
| on: | |
| schedule: | |
| - cron: "30 14 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync-instagram: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Playwright Chromium | |
| run: npx playwright install --with-deps chromium | |
| - name: Sync Instagram follower count | |
| run: npm run instagram:sync | |
| - name: Commit updated Instagram follower count | |
| run: | | |
| if git diff --quiet -- data/instagram-follower-count.json; then | |
| echo "No instagram count changes to commit." | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add data/instagram-follower-count.json | |
| git commit -m "chore: sync Instagram follower count" | |
| git push |