fix(ci): install cnwebsite deps before build#1023
Conversation
❌ Deploy Preview for reactnativecn failed. Why did it fail? →
|
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ 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: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe GitHub Pages workflow is updated to include itself as a triggering path in the push filter, and the dependency installation step is changed from a single root-level ChangesGitHub Pages Workflow Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/gh-pages.yml (1)
27-30: ⚡ Quick winConsider optimizing the yarn cache for cnwebsite's lockfile.
The install step correctly fixes the build failure by installing cnwebsite dependencies. However, the
cache: yarnconfiguration at line 24 defaults to the rootyarn.lock. Ifcnwebsitehas its ownyarn.lock, you may improve cache performance by specifying the cache key path.⚡ Optional cache optimization
- name: Set up Node.js uses: actions/setup-node@v6 with: node-version: "24" - cache: yarn + cache: yarn + cache-dependency-path: | + yarn.lock + cnwebsite/yarn.lockAlternatively, if only
cnwebsite/yarn.lockis relevant for this workflow, you could simplify to:- name: Set up Node.js uses: actions/setup-node@v6 with: node-version: "24" - cache: yarn + cache: yarn + cache-dependency-path: cnwebsite/yarn.lock🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/gh-pages.yml around lines 27 - 30, The workflow currently caches Yarn using the root lockfile but CN website dependencies live in the cnwebsite subfolder; update the cache configuration that uses "cache: yarn" so it keys off cnwebsite/yarn.lock (or otherwise scopes the cache to the cnwebsite working directory) to ensure the cache is specific to the cnwebsite lockfile; locate the workflow's cache block referencing "cache: yarn" and adjust the key/path to include "cnwebsite/yarn.lock" and ensure the install steps (the cd cnwebsite and yarn install) will hit that cache.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/gh-pages.yml:
- Around line 27-30: The workflow currently caches Yarn using the root lockfile
but CN website dependencies live in the cnwebsite subfolder; update the cache
configuration that uses "cache: yarn" so it keys off cnwebsite/yarn.lock (or
otherwise scopes the cache to the cnwebsite working directory) to ensure the
cache is specific to the cnwebsite lockfile; locate the workflow's cache block
referencing "cache: yarn" and adjust the key/path to include
"cnwebsite/yarn.lock" and ensure the install steps (the cd cnwebsite and yarn
install) will hit that cache.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2e61b8c8-d5f1-4c7f-9fcb-4f21c8e587cc
📒 Files selected for processing (1)
.github/workflows/gh-pages.yml
0a60964 to
9a41d0b
Compare
cnwebsite was missing from root workspaces, so yarn install in CI did not install its dependencies (including @docusaurus/core), causing 'docusaurus: not found' during build. Also add workflow file to paths filter so workflow changes trigger builds.
9a41d0b to
f402c53
Compare
cnwebsite 不在 root yarn workspaces 里,根目录 yarn install 不会安装 cnwebsite 的依赖(包括 @docusaurus/core),导致 CI 构建报 docusaurus: not found (exit 127)。
修复:
Summary by CodeRabbit