Skip to content

feat(phase-4): Pagefind·SEO·CI 가드로 출시 전 운영을 잠근다 - #61

Open
gitgitWi wants to merge 12 commits into
feat/phase-3-quizfrom
feat/phase-4-hardening
Open

gitgitWi wants to merge 12 commits into
feat/phase-3-quizfrom
feat/phase-4-hardening

Conversation

@gitgitWi

@gitgitWi gitgitWi commented Sep 9, 2026 •

Copy link
Copy Markdown
Owner

스택: base feat/phase-3-quiz ← head feat/phase-4-hardening — #60(phase-3)이 먼저 머지돼야 이 디프가 맞다. 그 전에는 #56 → #58 → #59 → #60 순서.

왜

출시 전 검색·SEO·공개안전·CI 게이트가 없으면 Pages 배포 후 회귀를 사람이 매번 수동으로 잡아야 한다. Phase 4는 Pagefind 검색, sitemap/RSS/OG, 404, leak-guard, CI를 한 스택 PR로 잠근다.

흐름

flowchart TD
  subgraph ASIS["AS-IS"]
    A1["PR 머지"] --> A2["deploy.yml만 존재"]
    A2 --> A3["검색·SEO·leak 검증 없음"]
  end
  subgraph TOBE["TO-BE"]
    B1["PR push"] --> B2["ci.yml 게이트"]
    B2 -->|"통과"| B3["build+pagefind+가드"]
    B2 -->|"실패"| B4["머지 차단"]
    B3 --> B5["Actions Pages 배포"]
  end
  style A3 fill:#ffebee,stroke:#c62828,color:#c62828
  style B3 fill:#e8f5e9,stroke:#2e7d32,color:#2e7d32
  style B4 fill:#fff3e0,stroke:#e65100,color:#e65100
Loading
sequenceDiagram
  participant Dev as Developer
  participant CI as ci.yml
  participant Build as bun run build
  participant PF as pagefind WASM
  participant Guard as check scripts
  Dev->>CI: push PR
  CI->>CI: check format lint test schema leak
  CI->>Build: generate-og astro build pagefind
  Build->>PF: index dist
  CI->>Guard: links search top-3 budget storybook
  Guard-->>Dev: green or fail
Loading

효과

flowchart LR
  P["이 PR"] --> U["사용자: /search 검색, RSS·sitemap, 404 안내"]
  P --> B["비즈니스: private·raw·secret leak CI 차단"]
  P --> O["운영: PR마다 11단 게이트, legacy-next 제거"]
  P --> Q["품질: schema Zod·Pagefind Top-3·50KB JS 예산"]
Loading

범위

flowchart TD
  subgraph IN["이번 PR"]
    I1["Pagefind + /search + WASM Top-3 check-search"]
    I2["sitemap RSS OG JSON-LD"]
    I3["404 NotFoundGuide"]
    I4["check-schema leak budget + ci.yml"]
    I5["legacy-next 삭제"]
  end
  subgraph NEXT["후속 — 사람"]
    N1["GitHub Pages Source=Actions 확인 후 gh-pages 브랜치 삭제"]
    N2["#56 머지 후 branch protection에 CI 필수 연결"]
  end
  subgraph OUT["제외"]
    X1["gh-pages 원격 삭제 — Pages=Actions 전환 후 사람"]
    X2["한국어 Pagefind stemming — Pagefind 한계"]
  end
Loading

검색 Top-3 (check-search)

Pagefind WASM search() 순위 — results.slice(0, 3)의 raw_url에 expected path 포함.

Query Expected (rank ≤3)
리팩토링 /til/refactoring-javascript/01/
Personal Design System /articles/design-system/01/
literal /til/ts/enum-to-template-literal/

검증

$ bun run build && bun run check-search
check-search: OK (3 queries ranked top-3 via Pagefind WASM)

$ bun run check
Result (144 files): 0 errors

$ bunx oxfmt --check .
All matched files use the correct format.

$ bunx vitest run
 Test Files  7 passed (7)
      Tests  28 passed (28)

추가 로컬 게이트 (CI 동일):

$ node scripts/check-leak.mjs → check-leak: OK (103 publishable file(s) scanned)
$ bun run check-links → check-links: OK
$ node scripts/check-budget.mjs → check-budget: OK
$ bun run build-storybook → completed successfully

@gitgitWi gitgitWi added phase-4 Phase 4 Hardening: Pagefind, SEO, leak-guard astro Astro, StyleX, GitHub Pages ci GitHub Actions, gates, lockfiles labels Sep 9, 2026
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@gitgitWi gitgitWi self-assigned this Sep 9, 2026
@gitgitWi
gitgitWi marked this pull request as ready for review September 9, 2026 19:03
@gitgitWi
gitgitWi added this pull request to stack #62 September 13, 2026 18:38
gitgitWi and others added 12 commits October 2, 2026 13:40
Co-authored-by: Cursor <cursoragent@cursor.com>
bun 1.4·Node 22에서 check·format·lint·test·schema·leak·build·links·budget·storybook을 순차 실행한다.
generate-og 후 astro build·pagefind 인덱싱까지 한 번에 돌린다.
astro sync+Zod·공개안전 leak·50KB JS 예산·sharp OG PNG 생성을 CI에서 검증한다.
articles·til에 BlogPosting/TechArticle과 빌드타임 OG 경로를 연결한다.
wiki/quiz·검색 페이지는 인덱스 제외, 제목·태그에 pagefind 메타를 둔다.
redirects.json 미매핑 구 Next 경로는 검색·홈으로 유도한다.
Phase 4 이후 Next 스냅샷은 더 이상 유지하지 않는다.
PR-DRAFT 전 구현 범위와 게이트 요약을 남긴다.
src/components·layouts·lib 스캔, secret 패턴, Pagefind Top-3 fragment 검증을 CI에 연결한다.
fragment substring 대신 pagefind.js search() 결과 slice(0,3) raw_url을 assert한다.
Co-authored-by: Cursor <cursoragent@cursor.com>
@gitgitWi
gitgitWi force-pushed the feat/phase-4-hardening branch from 61efb55 to f364a5c Compare October 2, 2026 04:40

This branch has not been deployed

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

Labels

astro Astro, StyleX, GitHub Pages ci GitHub Actions, gates, lockfiles phase-4 Phase 4 Hardening: Pagefind, SEO, leak-guard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant