From 28dede7161e106ca45344c7d3ca4395419f6dbbc Mon Sep 17 00:00:00 2001 From: owjs3901 Date: Thu, 24 Sep 2026 22:54:08 +0900 Subject: [PATCH] fix(landing): authenticate the team page GitHub fetch in CI The e2e suite's browser requests to api.github.com use up the runner's 60-request unauthenticated quota. The singleCss landing build that runs after it then gets a rejected /users request, the team page throws during prerender, vinext skips /team, and the route manifest check fails the publish job on main. Send GITHUB_TOKEN when it is set and pass it to the landing build steps. Authenticated requests use the token's own quota. The token is read by a server component at build time; it does not appear in dist/ or out/. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- .github/workflows/publish.yml | 8 ++++++++ apps/landing/src/app/(detail)/team/TeamCard.tsx | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 275bcd474..cd3b62a9f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -107,6 +107,8 @@ jobs: - run: bun install - run: bun run build - name: Build Landing (Next) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | bun run --filter @devup-ui/components build-storybook mv ./packages/components/storybook-static ./apps/landing/public/storybook @@ -121,6 +123,8 @@ jobs: - name: Run E2E Tests (Next) run: bun run test:e2e:next - name: Build Landing (Next, singleCss) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | rm -rf apps/landing/out apps/landing/.next apps/landing/df DEVUP_SINGLE_CSS=1 bun run --filter landing build:next @@ -236,6 +240,8 @@ jobs: cargo fmt --all -- --check git diff --exit-code - name: Build Landing + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | bun run --filter @devup-ui/components build-storybook mv ./packages/components/storybook-static ./apps/landing/public/storybook @@ -266,6 +272,8 @@ jobs: - name: Run E2E Tests run: bun run test:e2e - name: Build Landing (singleCss) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | rm -rf apps/landing/dist apps/landing/.next apps/landing/.vinext apps/landing/df DEVUP_SINGLE_CSS=1 bun run --filter landing build diff --git a/apps/landing/src/app/(detail)/team/TeamCard.tsx b/apps/landing/src/app/(detail)/team/TeamCard.tsx index 79ebf0cad..d53f7e665 100644 --- a/apps/landing/src/app/(detail)/team/TeamCard.tsx +++ b/apps/landing/src/app/(detail)/team/TeamCard.tsx @@ -17,7 +17,12 @@ interface GithubUser { } const getGithubUser = cache(async (userId: string) => { - const response = await fetch(`https://api.github.com/users/${userId}`) + // CI passes GITHUB_TOKEN: the e2e suite's browser requests use up the runner's + // unauthenticated quota before the second landing build fetches this. + const token = process.env.GITHUB_TOKEN + const response = await fetch(`https://api.github.com/users/${userId}`, { + headers: token ? { Authorization: `Bearer ${token}` } : undefined, + }) if (!response.ok) { throw new Error(`GitHub user request failed with ${response.status}`) }