ci: restructure build pipeline for dual deployment#32
Conversation
Replace withastro/action with explicit steps so the workflow produces both a GitHub Pages artifact and a generic dist/ artifact. Adds pull_request trigger for future preview support. GitHub Pages deploy is conditioned on push to main so PRs don't trigger deployment. Closes chinmina-docs-7yn.1
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 0 minutes and 54 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThe GitHub Actions workflow was reworked to replace the Astro action with explicit Node/pnpm build steps, add a pull_request trigger, upload Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Replace non-existent enable-corepack input on setup-node with an explicit corepack enable run step. Update actions to latest versions: setup-node v6, upload-pages-artifact v4, upload-artifact v7, deploy-pages v5.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/deploy.yaml:
- Around line 24-29: The workflow step using actions/setup-node@v4 is
misconfigured: remove the unsupported enable-corepack input, add an explicit
node-version (e.g., 'lts/*' or specific semver) to the actions/setup-node@v4
step, then insert a new step that runs `corepack enable` before running `pnpm
install` so pnpm is guaranteed to be available; update the existing `Install
dependencies` step (which runs `pnpm install`) to remain after the `corepack
enable` step.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2055320a-be75-4947-8d38-3b70affd8af8
📒 Files selected for processing (1)
.github/workflows/deploy.yaml
Switch from mise.toml to the asdf-compatible .tool-versions file so both mise and actions/setup-node (via node-version-file) read the node version from a single authoritative source.
Purpose
Prepares the CI pipeline for dual deployment to both GitHub Pages and Cloudflare Pages by producing two distinct artifacts from a single build.
The existing
withastro/actionis an all-in-one action that bundles setup, install, build, and artifact upload into a black box. It only uploads a GitHub Pages artifact, which is insufficient for the upcoming Cloudflare Pages deployment that needs a genericdist/artifact. Replacing it with explicit steps makes both artifacts available and gives the pipeline full control over the build process.The workflow now also triggers on pull requests, enabling preview deployments in a future step. GitHub Pages deployment is guarded by an
ifcondition so it only runs on push to main — PR builds run the full build and artifact upload without triggering a live deployment.Context
Summary by CodeRabbit