Skip to content

Collect GitHub Stats #13

Collect GitHub Stats

Collect GitHub Stats #13

Workflow file for this run

name: Collect GitHub Stats
on:
schedule:
# Daily at 23:00 UTC. The 14-day Traffic API window forgives missed runs.
- cron: "0 23 * * *"
workflow_dispatch: {}
concurrency:
group: collect
cancel-in-progress: false
jobs:
collect:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- run: pip install -r requirements.txt
- name: Collect
env:
GH_TRAFFIC_TOKEN: ${{ secrets.GH_TRAFFIC_TOKEN }}
INCLUDE_FORKS: "false"
INCLUDE_ARCHIVED: "false"
INCLUDE_PRIVATE: "false"
run: python collect.py
- name: Commit & push
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add data/ docs/data/ docs/index.html
if git diff --cached --quiet; then
echo "no changes"
else
git commit -m "data: $(date -u +%Y-%m-%d)"
git push
fi