Skip to content

Commit cbf44e5

Browse files
chore: deploy the site through Vercel's Git integration
Vercel builds every push to main with vercel.json, so the Pages/Actions deploy workflow and the Pages CNAME file are no longer needed.
1 parent 26fea95 commit cbf44e5

3 files changed

Lines changed: 30 additions & 25 deletions

File tree

‎.github/workflows/site.yml‎

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,42 @@
11
name: Site
22

3-
# Builds benchmark.webdriver.io from results/ and deploys it to GitHub Pages.
3+
# Builds benchmark.webdriver.io from results/ and deploys it to Vercel
4+
# (project webdriverio-benchmark), the same way webdriver.io deploys:
5+
# build on GitHub Actions, upload the prebuilt output.
46
#
57
# The Benchmark workflow commits its results with GITHUB_TOKEN, and pushes
68
# made with that token do not trigger other workflows. So besides pushes,
79
# this also runs whenever a Benchmark run completes.
10+
#
11+
# Needs the VERCEL_TOKEN secret and the VERCEL_ORG_ID / VERCEL_PROJECT_ID
12+
# repository variables.
813

914
on:
1015
push:
1116
branches: [main]
12-
paths: [results/**, site/**, src/**, package.json, package-lock.json, .github/workflows/site.yml]
17+
paths: [results/**, site/**, src/**, package.json, package-lock.json, vercel.json, .github/workflows/site.yml]
1318
workflow_run:
1419
workflows: [Benchmark]
1520
types: [completed]
1621
workflow_dispatch:
1722

1823
concurrency:
19-
group: pages
24+
group: site
2025
cancel-in-progress: true
2126

2227
permissions:
2328
contents: read
2429

2530
jobs:
26-
build:
31+
deploy:
2732
runs-on: ubuntu-latest
33+
environment:
34+
name: production
35+
url: https://benchmark.webdriver.io
36+
env:
37+
VERCEL_ORG_ID: ${{ vars.VERCEL_ORG_ID }}
38+
VERCEL_PROJECT_ID: ${{ vars.VERCEL_PROJECT_ID }}
39+
VERCEL_TELEMETRY_DISABLED: 1
2840
steps:
2941
- uses: actions/checkout@v5
3042
with:
@@ -34,21 +46,15 @@ jobs:
3446
with:
3547
node-version: 24
3648
cache: npm
37-
- run: npm ci
38-
- run: npm run site
39-
- uses: actions/upload-pages-artifact@v4
40-
with:
41-
path: dist
42-
43-
deploy:
44-
needs: build
45-
runs-on: ubuntu-latest
46-
permissions:
47-
pages: write
48-
id-token: write
49-
environment:
50-
name: github-pages
51-
url: ${{ steps.deploy.outputs.page_url }}
52-
steps:
53-
- id: deploy
54-
uses: actions/deploy-pages@v4
49+
- name: Deploy to Vercel
50+
env:
51+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
52+
run: |
53+
if [ -z "${VERCEL_TOKEN:-}" ] || [ -z "${VERCEL_ORG_ID:-}" ] || [ -z "${VERCEL_PROJECT_ID:-}" ]; then
54+
echo "::error::Set the VERCEL_TOKEN secret and the VERCEL_ORG_ID / VERCEL_PROJECT_ID variables. Nothing was published."
55+
exit 1
56+
fi
57+
npx --yes vercel@59 pull --yes --environment=production --token="$VERCEL_TOKEN"
58+
npx --yes vercel@59 build --prod --token="$VERCEL_TOKEN"
59+
URL=$(npx --yes vercel@59 deploy --prebuilt --prod --token="$VERCEL_TOKEN")
60+
echo "Deployed $URL → https://benchmark.webdriver.io" >> "$GITHUB_STEP_SUMMARY"

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ If Stagehand's tools call a model of their own, those tokens do not show up in t
128128

129129
Runs are grouped by **setup + package version + model**. Every run of, say, `@wdio/cli@10.0.0` with `claude-sonnet-5` counts toward one row, across workflow runs; a new version starts a new row. The page shows the latest version of each tool, every version with per-task results and the runs behind it, and a log of all runs.
130130

131-
The [Site workflow](.github/workflows/site.yml) deploys it to GitHub Pages on every push to `main` and after every Benchmark run. To preview locally:
131+
The [Site workflow](.github/workflows/site.yml) builds it and deploys it to Vercel (project `webdriverio-benchmark`) on every push to `main` and after every Benchmark run. It needs the `VERCEL_TOKEN` secret and the `VERCEL_ORG_ID` / `VERCEL_PROJECT_ID` repository variables. To preview locally:
132132

133133
```sh
134134
npm run site && npx serve dist
@@ -148,7 +148,7 @@ We will fix both gaps in WebdriverIO before publishing results, and say so in th
148148

149149
```
150150
.github/workflows/benchmark.yml the benchmark workflow
151-
.github/workflows/site.yml builds and deploys benchmark.webdriver.io
151+
.github/workflows/site.yml builds and deploys benchmark.webdriver.io to Vercel
152152
src/run.ts runner: installs tools, runs the plan, writes runs-*.jsonl and meta-*.json
153153
src/setups.ts the five tool setups
154154
src/tools.ts installs and pins the npm package behind each setup

‎site/CNAME‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)