Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 4, 2026

The /board/ page displays empty content because fetch-board-data.js requires GitHub GraphQL API authentication, but the pages.yml workflow doesn't pass a token to the build step.

Changes

  • Add GITHUB_TOKEN environment variable to "Build website" step in .github/workflows/pages.yml
- name: Build website
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  run: bun run build

This matches the pattern used in update-driver-versions.yml and pdf.yml. Unlike REST API endpoints used by other fetch scripts, GraphQL requires authentication and cannot work anonymously.

Original prompt

Problem

The /board/ page at https://docs.projectbluefin.io/board/ isn't populated with real data because the fetch-board-data.js script requires a GitHub token for GraphQL API access, but the pages.yml workflow doesn't pass the token to the build step.

Root Cause

In .github/workflows/pages.yml, the "Build website" step runs bun run build, which triggers npm run fetch-data (including fetch-board-data). However, unlike the REST API used by other fetch scripts, the GraphQL API requires authentication - it cannot work anonymously.

The script at scripts/fetch-board-data.js checks for GITHUB_TOKEN or GH_TOKEN and creates an empty JSON file when no token is found, resulting in an empty board page.

Solution

Add the GITHUB_TOKEN environment variable to the build step in .github/workflows/pages.yml:

      - name: Build website
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: bun run build

This matches the pattern used in other workflows like update-driver-versions.yml and pdf.yml.

Files to modify

  • .github/workflows/pages.yml - Add env block with GITHUB_TOKEN to the "Build website" step

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: castrojo <1264109+castrojo@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub token to build step for board data fetching Add GITHUB_TOKEN to build step for board data fetching Jan 4, 2026
Copilot AI requested a review from castrojo January 4, 2026 00:45
@castrojo castrojo marked this pull request as ready for review January 4, 2026 00:46
@castrojo castrojo merged commit 82b2c5b into main Jan 4, 2026
1 check passed
@castrojo castrojo deleted the copilot/add-github-token-to-build-step branch January 4, 2026 00:46
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.

2 participants