Skip to content

ci(pages): giscus/GA 설정값을 실제 배포 빌드에 연결 - #77

Merged
CoBool merged 1 commit into
mainfrom
claude/wire-ga-giscus-to-deploy
Aug 15, 2026
Merged

ci(pages): giscus/GA 설정값을 실제 배포 빌드에 연결#77
CoBool merged 1 commit into
mainfrom
claude/wire-ga-giscus-to-deploy

Conversation

@CoBool

@CoBool CoBool commented Aug 15, 2026

Copy link
Copy Markdown
Owner

변경 내용

  • NEXT_PUBLIC_GISCUS_REPO/REPO_ID/CATEGORY/CATEGORY_ID/MAPPING, NEXT_PUBLIC_GA_MEASUREMENT_ID 여섯 값을 저장소 Variables로 등록.
  • .github/workflows/deploy-pages.yml의 Build 스텝 env:에 위 여섯 값을 추가.

변경 이유

giscus(#76)와 Google Analytics는 코드·설정 로직이 이미 갖춰져 있고 로컬 .env.local로도 검증했지만, 실제 배포 워크플로의 Build 스텝은 지금까지 NEXT_PUBLIC_SITE_URL만 넘기고 있었다. .env.local은 gitignore 대상이라 CI에서는 보이지 않으므로, 이 상태로는 로컬에서 아무리 잘 켜져도 실제 배포된 사이트에는 두 기능 다 반영되지 않는다. 저장소 Variables에 값을 등록하고 워크플로에 연결해야 프로덕션 빌드에서 켜진다.

검증

  • pnpm lint 통과
  • pnpm typecheck 통과
  • 로컬 .env.local에 동일한 값으로 pnpm build 실행 — 빌드된 HTML에 giscus data-repo-id/gtag measurement ID가 정확한 값으로 들어가는 것 확인
  • 이 PR이 머지되어 실제 배포가 한 번 돌면 GitHub Pages 사이트에서 댓글 위젯과 GA 태그가 뜨는지 별도로 확인 필요

🤖 Generated with Claude Code

The deploy workflow's Build step only ever set NEXT_PUBLIC_SITE_URL,
so giscus (added in #76) and Google Analytics never actually turned on
in production even after being configured — both features only exist
locally via .env.local, which is gitignored and invisible to CI.

Add the six NEXT_PUBLIC_GISCUS_*/NEXT_PUBLIC_GA_MEASUREMENT_ID values
as repository variables and wire them into the Build step's env block.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@CoBool
CoBool merged commit 151f74c into main Aug 15, 2026
1 check passed
@CoBool
CoBool deleted the claude/wire-ga-giscus-to-deploy branch August 15, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant