ci(pages): giscus/GA 설정값을 실제 배포 빌드에 연결 - #77
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경 내용
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가 정확한 값으로 들어가는 것 확인🤖 Generated with Claude Code