Pinterest Auto-Poster #49
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: Pinterest Auto-Poster | |
| on: | |
| schedule: | |
| - cron: '0 9 * * *' # Runs every day at 9:00 AM UTC | |
| workflow_dispatch: # Allows manual trigger | |
| jobs: | |
| post-pins: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: Run Pinterest Bot | |
| env: | |
| PINTEREST_APP_ID: ${{ secrets.PINTEREST_APP_ID }} | |
| PINTEREST_APP_SECRET: ${{ secrets.PINTEREST_APP_SECRET }} | |
| PINTEREST_REFRESH_TOKEN: ${{ secrets.PINTEREST_REFRESH_TOKEN }} | |
| PINTEREST_BOARD_ID: ${{ secrets.PINTEREST_BOARD_ID }} | |
| PINS_PER_DAY: 3 | |
| run: node scripts/pinterest-bot.mjs | |
| - name: Commit Updated DB | |
| uses: stefanzweifel/git-auto-commit-action@v4 | |
| with: | |
| commit_message: "chore: Auto-update pins database" | |
| file_pattern: "scripts/pins-data.json" |