CrispStrobe Claude Sonnet 4.6 commited on
Commit
caae315
·
1 Parent(s): eaca95b

ci: add GitHub Actions workflows for daily provider and weekly benchmark data refresh

Browse files

Workflows commit updated JSON back to the repo, triggering Vercel auto-redeploy.
REQUESTY_API_KEY and OPENROUTER_API_KEY must be set in repo secrets.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

.github/workflows/update-benchmarks.yml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Update benchmark data
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '0 4 * * 0' # weekly, Sunday at 04:00 UTC
6
+ workflow_dispatch: # allow manual trigger from GitHub Actions UI
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ jobs:
12
+ update:
13
+ runs-on: ubuntu-latest
14
+ timeout-minutes: 30
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - uses: actions/setup-node@v4
20
+ with:
21
+ node-version: '22'
22
+ cache: 'npm'
23
+
24
+ - run: npm install
25
+
26
+ - name: Fetch all benchmark data
27
+ run: node scripts/fetch-benchmarks.js
28
+
29
+ - name: Commit if changed
30
+ run: |
31
+ git config user.name "github-actions[bot]"
32
+ git config user.email "github-actions[bot]@users.noreply.github.com"
33
+ git add data/benchmarks.json
34
+ git diff --staged --quiet && echo "No changes." || (
35
+ git commit -m "chore: update benchmark data [skip ci]" &&
36
+ git push
37
+ )
.github/workflows/update-providers.yml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Update provider data
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '0 6 * * *' # daily at 06:00 UTC
6
+ workflow_dispatch: # allow manual trigger from GitHub Actions UI
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ jobs:
12
+ update:
13
+ runs-on: ubuntu-latest
14
+ timeout-minutes: 10
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - uses: actions/setup-node@v4
20
+ with:
21
+ node-version: '22'
22
+ cache: 'npm'
23
+
24
+ - run: npm install
25
+
26
+ - name: Fetch all provider data
27
+ env:
28
+ REQUESTY_API_KEY: ${{ secrets.REQUESTY_API_KEY }}
29
+ OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
30
+ run: node scripts/fetch-providers.js
31
+
32
+ - name: Commit if changed
33
+ run: |
34
+ git config user.name "github-actions[bot]"
35
+ git config user.email "github-actions[bot]@users.noreply.github.com"
36
+ git add data/providers.json
37
+ git diff --staged --quiet && echo "No changes." || (
38
+ git commit -m "chore: update provider data [skip ci]" &&
39
+ git push
40
+ )