Skip to content

Add GitHub Pages docs deployment#20

Merged
sheepla merged 1 commit intomasterfrom
feat/github-pages-docs
May 2, 2026
Merged

Add GitHub Pages docs deployment#20
sheepla merged 1 commit intomasterfrom
feat/github-pages-docs

Conversation

@sheepla
Copy link
Copy Markdown
Owner

@sheepla sheepla commented May 2, 2026


Open in Devin Review

Summary by CodeRabbit

  • Chores
    • Added automated documentation build to the CI pipeline
    • Enabled automatic documentation deployment to GitHub Pages on updates to the master branch
    • Updated documentation site configuration to support environment-based settings

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 2, 2026

📝 Walkthrough

Walkthrough

This PR establishes automated documentation building and deployment infrastructure. The Astro config now reads site and base URL from environment variables. A docs-build job is added to the CI workflow, and a new Docs workflow handles building and deploying documentation to GitHub Pages.

Changes

Documentation Build and Deploy Pipeline

Layer / File(s) Summary
Configuration
docs/astro.config.mjs
Astro config now derives site and base from environment variables; site defaults to https://sheepla.github.io and base defaults to / or /${repositoryName} when available.
CI Build Integration
.github/workflows/ci.yml
New docs-build job added to CI workflow; sets up Node.js v22 and pnpm v10 in docs directory, installs frozen dependencies, and runs pnpm run build.
Pages Deployment Workflow
.github/workflows/docs.yml
New Docs workflow triggered on pushes to master and manual dispatch; includes build job (identical setup to CI build job) and dependent deploy job that uploads artifact to GitHub Pages with least-privilege permissions and id-token auth.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 Hop, hop, docs now build with care,
Environment winds through the air,
Pages deployed, a rabbit's delight,
Documentation shining so bright!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add GitHub Pages docs deployment' clearly summarizes the main change: adding documentation deployment infrastructure to GitHub Pages via new CI/CD workflows and Astro configuration updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/github-pages-docs

Review rate limit: 9/10 reviews remaining, refill in 6 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/docs.yml (1)

44-49: Move Configure GitHub Pages before the build step and wire its outputs to the build environment.

The Astro build reads SITE_URL and BASE_PATH from environment variables (astro.config.mjs lines 10–11), but the Configure GitHub Pages step currently runs after the build. Place this step before the build with an id, then pass base_url to the SITE_URL env var and base_path to the BASE_PATH env var so the build uses the correct Pages-provided values instead of defaults.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/docs.yml around lines 44 - 49, Move the Configure GitHub
Pages step to run before the Build docs step, give that step an id (e.g., id:
configure_pages) and wire its outputs into the build job environment by setting
SITE_URL to the action output base_url and BASE_PATH to base_path for the pnpm
run build step; specifically, locate the steps named "Configure GitHub Pages"
(uses: actions/configure-pages@v5) and "Build docs" (run: pnpm run build), add
an id to the configure step and then add env: SITE_URL: ${{
steps.configure_pages.outputs.base_url }} and BASE_PATH: ${{
steps.configure_pages.outputs.base_path }} to the Build docs step so
astro.config.mjs reads the Pages-provided values during build.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/docs.yml:
- Around line 44-49: Move the Configure GitHub Pages step to run before the
Build docs step, give that step an id (e.g., id: configure_pages) and wire its
outputs into the build job environment by setting SITE_URL to the action output
base_url and BASE_PATH to base_path for the pnpm run build step; specifically,
locate the steps named "Configure GitHub Pages" (uses:
actions/configure-pages@v5) and "Build docs" (run: pnpm run build), add an id to
the configure step and then add env: SITE_URL: ${{
steps.configure_pages.outputs.base_url }} and BASE_PATH: ${{
steps.configure_pages.outputs.base_path }} to the Build docs step so
astro.config.mjs reads the Pages-provided values during build.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 83c38159-ffaa-4ba8-93be-cf3772030a81

📥 Commits

Reviewing files that changed from the base of the PR and between 3e736d0 and 19ac3b9.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • .github/workflows/docs.yml
  • docs/astro.config.mjs

@sheepla sheepla merged commit 74463da into master May 2, 2026
4 checks passed
@sheepla
Copy link
Copy Markdown
Owner Author

sheepla commented May 2, 2026

Thanks, I confirmed to publish to GitHub Pages successfully! 🚀

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