Conversation
Deploys Docusaurus site to https://gricha.github.io/perry/ on push to main. Triggers on: - Push to main when docs/ changes - Manual workflow dispatch 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
| - name: Build | ||
| working-directory: docs | ||
| run: bun run build |
There was a problem hiding this comment.
Bug: The documentation build script in the workflow is missing NODE_ENV=production, causing an incorrect baseUrl to be configured and breaking the deployed site.
Severity: CRITICAL | Confidence: High
🔍 Detailed Analysis
The GitHub Actions workflow for building documentation executes docusaurus build without setting the NODE_ENV environment variable. According to Docusaurus's build process, process.env.NODE_ENV can be undefined during the initial evaluation of docusaurus.config.ts. This causes the isProd variable in the configuration to become false. Consequently, the baseUrl is incorrectly set to '/' instead of the required '/perry/' for the GitHub Pages deployment. This will result in a non-functional deployed site where all asset paths and internal links are broken.
💡 Suggested Fix
In .github/workflows/docs.yml, update the build step to include the NODE_ENV environment variable. Set env: NODE_ENV: production for the step that runs bun run build. This ensures the baseUrl is correctly configured for the production deployment to GitHub Pages.
🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: .github/workflows/docs.yml#L35-L37
Potential issue: The GitHub Actions workflow for building documentation executes
`docusaurus build` without setting the `NODE_ENV` environment variable. According to
Docusaurus's build process, `process.env.NODE_ENV` can be `undefined` during the initial
evaluation of `docusaurus.config.ts`. This causes the `isProd` variable in the
configuration to become `false`. Consequently, the `baseUrl` is incorrectly set to `'/'`
instead of the required `'/perry/'` for the GitHub Pages deployment. This will result in
a non-functional deployed site where all asset paths and internal links are broken.
Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8303835
Summary
Adds automatic deployment of Docusaurus docs to GitHub Pages.
docs/changesSetup Required
After merging, enable GitHub Pages in repo settings:
Test plan
🤖 Generated with Claude Code