Repository navigation
Sync Data #3
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: Sync Data | |
| on: | |
| schedule: | |
| - cron: "0 6 * * *" # Daily at 6 AM UTC | |
| workflow_dispatch: | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: pip install pandas clickhouse-connect beautifulsoup4 requests | |
| - name: Discover PyPI packages | |
| run: python scripts/discover_packages.py | |
| - name: Sync PyPI stats from ClickPy | |
| run: python scripts/sync_stats_clickpy.py | |
| - name: Sync GitHub profile data | |
| run: python scripts/sync_github.py | |
| - name: Generate manifest | |
| run: python scripts/generate_manifest.py | |
| - name: Commit and push | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add static/data/ | |
| git diff --quiet && git diff --staged --quiet || git commit -m "Update data $(date +%Y-%m-%d)" | |
| git push |