tpmjs/.github/workflows/sync-changes.yml
Ajax Davis 4febe71d76 fix: split sync workflow into separate files to fix job skipping issue
The previous combined workflow had flawed conditional logic that caused
sync-keyword and sync-metrics jobs to be skipped. GitHub Actions doesn't
populate github.event.schedule with the cron expression, so the equality
checks never matched.

Replaced with three separate workflow files:
- sync-changes.yml: Runs every 2 minutes
- sync-keyword.yml: Runs every 15 minutes
- sync-metrics.yml: Runs every hour

Each workflow can be manually triggered via workflow_dispatch.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 04:36:38 +10:00

18 lines
489 B
YAML

name: Sync NPM Changes Feed
on:
schedule:
# Run every 2 minutes
- cron: '*/2 * * * *'
workflow_dispatch:
jobs:
sync-changes:
runs-on: ubuntu-latest
steps:
- name: Trigger changes feed sync
run: |
curl -X POST "${{ secrets.VERCEL_PRODUCTION_URL }}/api/sync/changes" \
-H "Authorization: Bearer ${{ secrets.CRON_SECRET }}" \
-H "Content-Type: application/json" \
-f -s -S -w "\nHTTP Status: %{http_code}\n"