From 564ee4e95f84a9b7ec7232e070383ad20e9ba6da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=B0=EC=83=81=EB=B9=88?= Date: Sat, 15 Aug 2026 20:42:09 +0900 Subject: [PATCH] ci(pages): pass giscus and GA config into the production build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/deploy-pages.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index 2c31b96..8707be6 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -53,10 +53,18 @@ jobs: uses: actions/configure-pages@v6 # 절대 URL(canonical·Open Graph·sitemap·RSS)의 기준. Pages 가 알려준 주소를 그대로 쓴다. + # giscus 다섯 값과 GA 측정 ID는 저장소 Variables 에 등록돼 있다. giscus 는 다섯 값을 + # 전부 채우거나 전부 비워야 하므로(하나만 비면 빌드 실패) 값을 뺄 때는 다섯 개를 같이 뺀다. - name: Build run: pnpm build env: NEXT_PUBLIC_SITE_URL: ${{ steps.pages.outputs.base_url }} + NEXT_PUBLIC_GISCUS_REPO: ${{ vars.NEXT_PUBLIC_GISCUS_REPO }} + NEXT_PUBLIC_GISCUS_REPO_ID: ${{ vars.NEXT_PUBLIC_GISCUS_REPO_ID }} + NEXT_PUBLIC_GISCUS_CATEGORY: ${{ vars.NEXT_PUBLIC_GISCUS_CATEGORY }} + NEXT_PUBLIC_GISCUS_CATEGORY_ID: ${{ vars.NEXT_PUBLIC_GISCUS_CATEGORY_ID }} + NEXT_PUBLIC_GISCUS_MAPPING: ${{ vars.NEXT_PUBLIC_GISCUS_MAPPING }} + NEXT_PUBLIC_GA_MEASUREMENT_ID: ${{ vars.NEXT_PUBLIC_GA_MEASUREMENT_ID }} # Actions 배포 경로는 Jekyll 을 돌리지 않으므로 .nojekyll 이 필요 없다. # v4 부터 점으로 시작하는 파일·디렉터리를 tar 에서 제외한다. 지금 out/ 에는 없지만,