Repository navigation
63 lines (54 loc) 路 2.06 KB
/
Copy pathci-docs-stats.yml
File metadata and controls
63 lines (54 loc) 路 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Keep the GitHub star figures quoted in the docs in sync with the live repository.
#
# The star count is quoted on the docs landing page, in the three llms*.txt summaries, and
# as a number in mkdocs.yml. This job checks monthly and opens a PR when any of them has
# drifted.
name: Refresh Docs Stats
on:
schedule:
# 05:00 UTC on the first day of each month
- cron: "0 5 1 * *"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
refresh:
name: Refresh docs stats
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: 馃摜 Checkout the repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: 馃尶 Name the monthly refresh branch
id: branch
run: echo "name=chore/refresh-docs-stats-$(date -u +%Y-%m)" >> "$GITHUB_OUTPUT"
- name: 馃敘 Apply current star count
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python .github/scripts/update_docs_stats.py
# The action is a no-op when the script found no drift, so no separate diff gate is
# needed. It creates the branch and PR on first run of a month and amends both on
# any later run, rather than stacking duplicate PRs.
- name: 馃殌 Open refresh PR
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.branch.outputs.name }}
base: develop
add-paths: |
docs/index.md
docs/llms.txt
docs/llms.full.txt
docs/llms-100k.txt
mkdocs.yml
commit-message: "docs: refresh quoted GitHub star count"
title: "docs: refresh quoted GitHub star count"
body: |
Automated refresh: the star count quoted in the docs has drifted from the live
repository.
Generated by `.github/workflows/ci-docs-stats.yml`.
delete-branch: true