Skip to content

Enforce emphasis scarcity: at most one orange accent per figure #40

Enforce emphasis scarcity: at most one orange accent per figure

Enforce emphasis scarcity: at most one orange accent per figure #40

Workflow file for this run

name: Preview viz
on:
push:
branches:
- claude/tuftean-marginalia-viz-TB0fw
workflow_dispatch:
permissions:
contents: read
concurrency:
group: preview-viz
cancel-in-progress: true
jobs:
upload-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: false
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: uv sync --all-groups
- name: Build generated assets
run: make build
- name: Verify Cloudflare auth
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: npx --yes wrangler whoami
- name: Sync Python Workers vendor
run: uv run pywrangler sync
- name: Upload Cloudflare Preview
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: |
set -x
uv run pywrangler preview \
--name viz \
--message "${{ github.sha }}" \
--json
- name: Smoke test deployed Preview
run: |
set -euo pipefail
base="https://viz-pythonbyexample.adewale-883.workers.dev"
for path in \
"/" \
"/examples/values" \
"/prototyping/journey-figures-gestalt"; do
url="${base}${path}"
echo "Checking ${url}"
curl --fail --show-error --silent --location --output /tmp/preview-smoke.html --write-out "%{http_code} %{url_effective}\n" "${url}"
if grep -qiE "error code: 1101|PythonError|Traceback" /tmp/preview-smoke.html; then
echo "Preview rendered an exception for ${url}"
head -200 /tmp/preview-smoke.html
exit 1
fi
done
- name: Dump wrangler logs on failure
if: failure()
run: |
find ~ /tmp /root -name "*.log" -path "*wrangler*" 2>/dev/null | while read f; do
echo "=== $f ==="
tail -300 "$f" || true
done