Skip to content

fix(build): register political-intelligence_{lang}.html as Vite inputs#1963

Merged
pethers merged 2 commits intomainfrom
copilot/analyze-and-improve-sitemap-generation
Apr 23, 2026
Merged

fix(build): register political-intelligence_{lang}.html as Vite inputs#1963
pethers merged 2 commits intomainfrom
copilot/analyze-and-improve-sitemap-generation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

https://riksdagsmonitor.com/political-intelligence*.html returns 404 for all 14 locales. #1962 added the generator, pages, footer links, and sitemap entries — but not the Vite inputs. vite build only emits HTML listed in rollupOptions.input, so the PI pages never reached dist/ and deploy-s3.yml (uploads dist/ recursively) never pushed them to S3/CloudFront.

Changes

  • vite.config.js — add 14 political-intelligence* entries alongside the politician-dashboard* block.
  • .github/workflows/deploy-s3.yml — extend the Verify build artifacts step with spot-checks for political-intelligence.html, _sv.html, and _ar.html (RTL), failing with a message pointing at the Vite input list so this can't recur silently.
// vite.config.js — rollupOptions.input
'political-intelligence':     './political-intelligence.html',
'political-intelligence_sv':  './political-intelligence_sv.html',
// … 12 more locales (da, no, fi, de, fr, es, nl, ar, he, ja, ko, zh)

Notes

  • Norwegian kept as _no to match the generator output and every sibling _no file repo-wide; the BCP-47 nb migration is tracked site-wide, not per-page.
  • No changes to the PI generator, translations, footer wiring, sitemap, or deploy script — the only broken link was the input list.

@pethers pethers marked this pull request as ready for review April 23, 2026 14:11
Copilot AI review requested due to automatic review settings April 23, 2026 14:11
@pethers pethers merged commit 9a7ddc2 into main Apr 23, 2026
11 checks passed
@pethers pethers deleted the copilot/analyze-and-improve-sitemap-generation branch April 23, 2026 14:11
@github-actions github-actions Bot added javascript JavaScript code changes workflow GitHub Actions workflows ci-cd CI/CD pipeline changes deployment Deployment configuration performance Performance optimization size-s Small change (10-50 lines) labels Apr 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🏷️ Automatic Labeling Summary

This PR has been automatically labeled based on the files changed and PR metadata.

Applied Labels: javascript,workflow,ci-cd,deployment,performance,size-s

Label Categories

  • 🗳️ Content: news, dashboard, visualization, intelligence
  • 💻 Technology: html-css, javascript, workflow, security
  • 📊 Data: cia-data, riksdag-data, data-pipeline, schema
  • 🌍 I18n: i18n, translation, rtl
  • 🔒 ISMS: isms, iso-27001, nist-csf, cis-controls
  • 🏗️ Infrastructure: ci-cd, deployment, performance, monitoring
  • 🔄 Quality: testing, accessibility, documentation, refactor
  • 🤖 AI: agent, skill, agentic-workflow

For more information, see .github/labeler.yml.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes missing build outputs for the Political Intelligence static pages by registering them as explicit Vite multi-page inputs, and adds a deployment-time guard to prevent silent regressions.

Changes:

  • Add all 14 political-intelligence*.html pages to build.rollupOptions.input so vite build emits them into dist/.
  • Extend the deploy workflow’s artifact verification to assert the Political Intelligence pages are present in dist/ (including a Swedish and an RTL spot-check).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
vite.config.js Registers Political Intelligence HTML files as Vite/Rollup inputs so they are emitted to dist/ and deployed.
.github/workflows/deploy-s3.yml Adds build artifact checks to fail fast if Political Intelligence pages are missing from dist/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd CI/CD pipeline changes deployment Deployment configuration javascript JavaScript code changes performance Performance optimization size-s Small change (10-50 lines) workflow GitHub Actions workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants