Gmail Sync Every 6 Hours #735
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: Gmail Sync Every 6 Hours | |
| on: | |
| schedule: | |
| # Runs every 6 hours (0:00, 6:00, 12:00, 18:00 UTC) | |
| - cron: '0 */6 * * *' | |
| # Allows manual trigger from GitHub Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| sync-gmail: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Trigger Vercel Gmail Sync Endpoint | |
| run: | | |
| curl -X POST ${{ secrets.VERCEL_URL }}/api/cron/sync-gmail \ | |
| -H "Authorization: Bearer ${{ secrets.CRON_SECRET }}" \ | |
| -H "Content-Type: application/json" | |
| - name: Check Response | |
| if: failure() | |
| run: echo "Gmail sync failed - check Vercel logs" |