Skip to content

site: rename trend "markings" → "annotations" for consistency #51

site: rename trend "markings" → "annotations" for consistency

site: rename trend "markings" → "annotations" for consistency #51

Workflow file for this run

name: Deploy benchmark site to Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- name: Build results index
run: uv run index --results results --out results/index.json
- name: Stage site
run: |
mkdir -p _site
cp -r site/* _site/
mkdir -p _site/results
cp results/*.json _site/results/
# Append a content-hash query string to every JS/CSS reference in HTML
# so a fresh deploy invalidates Cloudflare's edge cache for that asset
# (cache key includes the full URL, including ?v=…). Source files in
# site/ stay un-versioned so local dev keeps working.
- name: Fingerprint static assets
working-directory: _site
run: |
shopt -s nullglob
for f in *.js *.css vendor/*.js vendor/*.css; do
[ -f "$f" ] || continue
hash=$(sha256sum "$f" | cut -c1-8)
for html in *.html; do
# Use # as sed delimiter since paths contain /.
sed -i -E "s#(src|href)=\"$f\"#\1=\"$f?v=$hash\"#g" "$html"
done
done
echo "Fingerprinted refs:"
grep -E '(src|href)="[^"]+\?v=' *.html | head -20 || true
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4