Skip to content

feat(graph): researcher-first view with click-to-expand neighbours #134

feat(graph): researcher-first view with click-to-expand neighbours

feat(graph): researcher-first view with click-to-expand neighbours #134

Workflow file for this run

name: Deploy Next.js to GitHub 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
defaults:
run:
working-directory: ./ui
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: ./ui/package-lock.json
- name: Setup Pages
uses: actions/configure-pages@v4
with:
static_site_generator: next
- name: Install dependencies
run: npm ci
- name: Run unit tests with coverage
run: npx vitest run --coverage --reporter=json --outputFile=test-results.json
continue-on-error: true
# --- Playwright E2E Report ---
- name: Build for E2E tests
run: npx next build
env:
NEXT_PUBLIC_STATIC_EXPORT: "false"
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Run Playwright E2E tests
run: npx playwright test --project=chromium
continue-on-error: true
env:
CI: true
NEXT_PUBLIC_STATIC_EXPORT: "false"
NEXTAUTH_SECRET: ci-test-secret-not-for-production
NEXTAUTH_URL: http://localhost:3000
# --- Static Export for Pages ---
- name: Disable API routes for static export
run: mv src/app/api /tmp/api_disabled || true
- name: Build with Next.js
run: npx next build
env:
NEXT_PUBLIC_STATIC_EXPORT: "true"
- name: Copy test reports to output (CI-generated)
run: |
mkdir -p out/test-reports out/ci-e2e-report
# Vitest coverage
cp -r coverage/ out/test-reports/coverage/ 2>/dev/null || true
cp test-results.json out/test-reports/ 2>/dev/null || true
# CI Playwright report goes to ci-e2e-report/ (chromium-only).
# The committed public/e2e-report/ (live + chromium from JAD stack)
# is already in out/e2e-report/ via Next.js static export.
cp -r playwright-report/* out/ci-e2e-report/ 2>/dev/null || true
# Generate comprehensive test report dashboard
node ../scripts/generate-test-report-page.js . out/test-reports || echo "Report generation skipped"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./ui/out
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4