-
Notifications
You must be signed in to change notification settings - Fork 48
77 lines (65 loc) · 2.6 KB
/
Copy pathsync-website.yml
File metadata and controls
77 lines (65 loc) · 2.6 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Sync leaderboard data to website
# Regenerates the derived data the RouteWorks website consumes
# (routerMetrics/leaderboard.json, category_scores.json, flip_labels/*) from the
# leaderboard manifest + evaluated prediction files, and opens a PR on
# RouteWorks/routeworks.github.io for review. The website's own deploy workflow
# publishes once that PR is merged.
#
# Requires a repository secret WEBSITE_SYNC_TOKEN: a fine-grained PAT (or GitHub
# App installation token) with Contents:write + Pull requests:write on
# RouteWorks/routeworks.github.io.
on:
push:
branches: [main]
paths:
- "README.md"
- "leaderboard_manifest.yaml"
- "router_inference/predictions/**"
- "scripts/website/build_site_data.py"
workflow_dispatch: {}
permissions:
contents: read
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout RouterArena
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install uv
run: pip install uv
- name: Prepare dataset
env:
ROUTERARENA_DATASET_DIR: ${{ github.workspace }}/dataset
run: uv run python scripts/process_datasets/prep_datasets.py
- name: Checkout website repo
uses: actions/checkout@v5
with:
repository: RouteWorks/routeworks.github.io
token: ${{ secrets.WEBSITE_SYNC_TOKEN }}
path: website
- name: Build website data (merge in place)
# Runs against the website's existing src/data so externally pre-computed
# baselines are preserved; only routers in the manifest are updated.
env:
ROUTERARENA_DATASET_DIR: ${{ github.workspace }}/dataset
run: uv run python scripts/website/build_site_data.py --out website/src/data
- name: Open PR on website repo
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.WEBSITE_SYNC_TOKEN }}
path: website
branch: routerarena-sync
commit-message: "Sync leaderboard data from RouterArena@${{ github.sha }}"
title: "Sync leaderboard data from RouterArena"
body: |
Automated update of `src/data` from RouterArena
(commit ${{ github.sha }}).
- `routerMetrics/leaderboard.json` — headline metrics (sourced from README)
- `routerMetrics/category_scores.json` — per-difficulty breakdown
- `flip_labels/*` — per-query robustness flips
Generated by `scripts/website/build_site_data.py`.
delete-branch: true