|
1 | | -## Running |
| 1 | +# SWT-Bench Documentation Site |
2 | 2 |
|
3 | | -To generate the website, run the following command. |
4 | | -```bash |
5 | | -python3 generate_index.py |
6 | | -``` |
| 3 | +This directory contains the source files for the SWT-Bench leaderboard website that is automatically deployed to GitHub Pages. |
| 4 | + |
| 5 | +## Files |
| 6 | + |
| 7 | +- `generate_index.py` - Python script that generates the final `index.html` from the template and CSV data |
| 8 | +- `index.template.html` - HTML template for the leaderboard page |
| 9 | +- `runs.csv` - Model performance data |
| 10 | +- `orgs.csv` - Organization/provider information |
| 11 | +- `approaches.csv` - Approach/paper mapping data |
| 12 | +- `static/` - Static assets (CSS, JS, images) |
| 13 | + |
| 14 | +## Automatic Deployment |
| 15 | + |
| 16 | +The site is automatically built and deployed to GitHub Pages via the `.github/workflows/deploy-pages.yml` workflow: |
| 17 | + |
| 18 | +1. **Triggers**: Runs on pushes to the `main` branch, pull requests, or manual dispatch |
| 19 | +2. **Build Process**: |
| 20 | + - Checks out the repository |
| 21 | + - Sets up Python 3.11 |
| 22 | + - Runs `generate_index.py` to create the final HTML |
| 23 | + - Uploads the entire `docs/` directory as a Pages artifact |
| 24 | +3. **Deployment**: Deploys to GitHub Pages (only on pushes to `main`) |
| 25 | + |
| 26 | +## Manual Generation |
| 27 | + |
| 28 | +To generate the site locally: |
7 | 29 |
|
8 | | -Then serve it using the following command. |
9 | 30 | ```bash |
10 | | -$ python3 -m http.server 8080 |
| 31 | +cd docs |
| 32 | +python generate_index.py |
11 | 33 | ``` |
12 | 34 |
|
13 | | -## Adding a new approach |
| 35 | +This will create/update the `index.html` file based on the current CSV data and template. |
| 36 | + |
| 37 | +## GitHub Pages Configuration |
14 | 38 |
|
15 | | -To add a new approach, do the following: |
| 39 | +Make sure GitHub Pages is configured in your repository settings: |
| 40 | +1. Go to Settings → Pages |
| 41 | +2. Set Source to "GitHub Actions" |
| 42 | +3. The workflow will handle the rest automatically |
16 | 43 |
|
17 | | -1) Add the approach to `approaches.csv` |
18 | | -2) Add the organization to `orgs.csv` |
19 | | -3) Add the specific run(s) to `runs.csv` (i.e., verified and lite if applicable) |
|
0 commit comments