Repository navigation
ci: add doc publishment workflow - #350
tsurumi-yizhou wants to merge 6 commits into
Conversation
|
Warning Rate limit exceeded
⌛ 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. 📝 WalkthroughWalkthroughUpdate CI workflow deployment: GitHub Pages deploy step switched from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/publish-docs.yml:
- Around line 6-7: The workflow currently grants broad token permissions via the
permissions key set to "contents: write"; change this to the least-privilege
option by replacing or removing that setting—either set "contents: read" or
remove the permissions block entirely—and ensure the publish step uses the
provided secrets.PUBLISH_TOKEN (not GITHUB_TOKEN) so the workflow still has the
push/publish access it needs; update any documentation/comments in the workflow
to note reliance on secrets.PUBLISH_TOKEN.
🧹 Nitpick comments (3)
.github/workflows/publish-docs.yml (3)
17-20: Align Node version with repo source-of-truth (and verify toolchain support).Pinning Node to
24could break doc tooling if it doesn’t support that runtime. Prefernode-version-file(e.g.,.nvmrcorpackage.jsonengines) so CI matches the repo’s declared version.🔧 Example alignment (adjust path if needed)
- name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '24' + node-version-file: '.nvmrc'
22-24: Prefernpm cifor reproducible installs (if lockfile exists).For CI,
npm ciis more deterministic and faster when a lockfile is present.⚙️ Suggested change
- name: Install dependencies - run: npm install + run: npm ci working-directory: ./docs
30-35: Use the correct token input for external repository deploys.For
peaceiris/actions-gh-pages, external repositories typically requirepersonal_token. Passing a PAT viagithub_tokenmay work, but it’s not the recommended input and could break deploys depending on action expectations.🔁 Suggested input change
- name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v4 with: - github_token: ${{ secrets.PUBLISH_TOKEN }} + personal_token: ${{ secrets.PUBLISH_TOKEN }} external_repository: clice-io/docs
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/deploy-docs.yml:
- Around line 25-26: The workflow currently passes github_token to
peaceiris/actions-gh-pages which cannot push to an external_repository; change
the action input from github_token to personal_token and ensure you supply a
repository-scoped Personal Access Token secret (e.g., replace the key
github_token: ${{ secrets.PUBLISH_DOCS }} with personal_token: ${{
secrets.PUBLISH_DOCS }} in the peaceiris/actions-gh-pages step) so the action
has write access to the external_repository.
|
See #353 |
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.