fix stat #4
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 | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| pip install -e . | |
| - 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 pull --rebase | |
| git push |