Skip to content

Add GitHub Pages deployment for docs#37

Merged
gricha merged 1 commit intomainfrom
ci/docs-deploy
Jan 7, 2026
Merged

Add GitHub Pages deployment for docs#37
gricha merged 1 commit intomainfrom
ci/docs-deploy

Conversation

@gricha
Copy link
Copy Markdown
Owner

@gricha gricha commented Jan 7, 2026

Summary

Adds automatic deployment of Docusaurus docs to GitHub Pages.

Setup Required

After merging, enable GitHub Pages in repo settings:

  1. Go to Settings → Pages
  2. Set Source to "GitHub Actions"

Test plan

  • Docs build successfully locally
  • Workflow runs on merge (will verify)

🤖 Generated with Claude Code

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>
@gricha gricha merged commit 2fed4a2 into main Jan 7, 2026
3 checks passed
@gricha gricha deleted the ci/docs-deploy branch January 7, 2026 20:58
Comment on lines +35 to +37
- name: Build
working-directory: docs
run: bun run build
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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.

1 participant