-
Notifications
You must be signed in to change notification settings - Fork 5
Add GitHub Pages deployment for docs #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: Deploy Docs | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - 'docs/**' | ||
| - '.github/workflows/docs.yml' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| concurrency: | ||
| group: pages | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version: latest | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: docs | ||
| run: bun install --frozen-lockfile | ||
|
|
||
| - name: Build | ||
| working-directory: docs | ||
| run: bun run build | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: docs/build | ||
|
|
||
| deploy: | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 incorrectbaseUrlto be configured and breaking the deployed site.Severity: CRITICAL | Confidence: High
π Detailed Analysis
The GitHub Actions workflow for building documentation executes
docusaurus buildwithout setting theNODE_ENVenvironment variable. According to Docusaurus's build process,process.env.NODE_ENVcan beundefinedduring the initial evaluation ofdocusaurus.config.ts. This causes theisProdvariable in the configuration to becomefalse. Consequently, thebaseUrlis 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 theNODE_ENVenvironment variable. Setenv: NODE_ENV: productionfor the step that runsbun run build. This ensures thebaseUrlis correctly configured for the production deployment to GitHub Pages.π€ Prompt for AI Agent
Did we get this right? π / π to inform future reviews.
Reference ID:
8303835