Skip to content
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

docs: use dumi to build new docs #5378

Merged
merged 1 commit into from
Dec 30, 2024
Merged

docs: use dumi to build new docs #5378

merged 1 commit into from
Dec 30, 2024

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Dec 30, 2024

Summary by CodeRabbit

  • Chores
    • Updated Vercel production deployment workflow to use a different branch trigger
    • Added dumi as a development dependency
    • Removed Node 14-16 specific scripts
    • Simplified site development and build scripts
    • Updated .gitignore to exclude .dumi directory in the site folder

Copy link

coderabbitai bot commented Dec 30, 2024

Walkthrough

The pull request introduces modifications to the project's configuration and build process. Changes include updating the Vercel production deployment workflow to target a different branch, adding the .dumi directory to .gitignore, updating the package.json with a new dependency and script modifications, and making a minor formatting adjustment in the site configuration file.

Changes

File Change Summary
.github/workflows/vercel-production.yml Branch trigger updated from master to master-skip-releases
.gitignore Added site/.dumi/ to ignored directories
package.json - Added dumi dev dependency (v2.4.17)
- Removed site:devWithNode14-16 and site:buildWithNode14-16 scripts
- Removed NODE_OPTIONS=--openssl-legacy-provider from site:dev and site:build scripts
site/config/config.ts Added a space in the 'Community' section

Poem

🐰 Hop, hop, through config's maze,
Branches shift and workflows blaze,
Dumi joins our coding dance,
Scripts trimmed with rabbit's glance,
Configuration's gentle breeze! 🚀


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@@ -5,7 +5,7 @@ env:
on:
push:
branches:
- master
- master-skip-releases
Copy link
Member Author

Choose a reason for hiding this comment

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

还需要时间去重构,先不构建

@fengmk2
Copy link
Member Author

fengmk2 commented Dec 30, 2024

image

Copy link

@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.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a09b1cf and 3c44e69.

📒 Files selected for processing (4)
  • .github/workflows/vercel-production.yml (1 hunks)
  • .gitignore (1 hunks)
  • package.json (2 hunks)
  • site/config/config.ts (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • site/config/config.ts
  • .gitignore
🔇 Additional comments (2)
package.json (2)

72-72: LGTM! Good choice of documentation tool.

The addition of dumi v2.4.17 is a good choice for building modern documentation:

  • It has good TypeScript support
  • It's actively maintained
  • It's well-suited for React-based documentation

103-104: LGTM! Scripts simplified appropriately.

The script changes are appropriate:

  • Removed Node 14-16 specific scripts as they're no longer needed (project requires Node.js >= 18.19.0)
  • Removed unnecessary NODE_OPTIONS=--openssl-legacy-provider flag which was likely needed for older Node.js versions

Let's verify the dumi scripts work with the current Node.js version:

✅ Verification successful

Let me verify the dumi dependency and configuration in the project.


Let me check the site configuration and dumi setup.


The dumi scripts are properly configured but require installation

The verification shows that:

  • Dumi is correctly configured as a dev dependency (version ^2.4.17)
  • There's a valid dumi configuration file at site/config/config.ts
  • The npx dumi command failed because node_modules are not available in the sandbox environment

The scripts are correctly defined and will work in the actual development environment where:

  1. Dependencies are installed (npm install or yarn install)
  2. Node.js >= 18.19.0 is used (as per project requirements)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if dumi commands are recognized and show their help output
npx dumi -h 2>/dev/null || echo "Dumi command not found"

Length of output: 68


Script:

#!/bin/bash
# Check package.json for dumi dependency and version
cat package.json | jq '.dependencies.dumi, .devDependencies.dumi'

# Check if there's a dumi config file
fd -e ts -e js "\.dumi\.(ts|js)$|config\.(ts|js)$" --type f

Length of output: 678


Script:

#!/bin/bash
# Check site config content
cat site/config/config.ts

# Check if there are any dumi-specific files in the site directory
fd . site/ -t f | grep -i dumi

# Check if there's a README or documentation about site setup
cat site/README.md 2>/dev/null || echo "No site README found"

Length of output: 2618

@@ -5,7 +5,7 @@ env:
on:
push:
branches:
- master
- master-skip-releases
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Production deployment workflow should use master branch instead of non-existent master-skip-releases

The verification reveals several issues:

  • The master-skip-releases branch does not exist in the repository
  • master is the default branch and is used by other critical workflows:
    • CI workflow runs on master
    • GitHub Pages deployment runs on master
    • The preview deployment explicitly ignores master (as it should)

The change to use master-skip-releases appears to be incorrect because:

  1. The branch doesn't exist, which would break the production deployment
  2. The repository uses master as its main branch for all other workflows
  3. There's a separate skip-releases branch used only for the release workflow, suggesting master-skip-releases was mistakenly combined

Recommendation:

  • Revert the branch configuration back to master in the Vercel production deployment workflow
🔗 Analysis chain

Verify the production deployment branch change

The branch for production deployment has been changed to master-skip-releases. This seems unusual for a production workflow. Could you please clarify:

  1. Is this intentional as part of the dumi migration?
  2. Why use a branch with "skip-releases" in its name for production deployment?
  3. Will this affect the documentation deployment process?

Let's check the branch setup:


Let me check the repository structure and workflow configurations to better understand the deployment setup.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the target branch exists and its recent activity
git branch -r | grep master-skip-releases
git log origin/master-skip-releases -n 1 2>/dev/null || echo "Branch not found"

Length of output: 43


Script:

#!/bin/bash
# Check all workflow files and their branch configurations
echo "=== Checking workflow files ==="
fd -e yml -e yaml . .github/workflows/ --exec cat {}

echo -e "\n=== Checking default branch ==="
git symbolic-ref refs/remotes/origin/HEAD || echo "Default branch reference not found"

echo -e "\n=== Checking active branches ==="
git branch -r

Length of output: 4483

@fengmk2 fengmk2 merged commit e440fad into master Dec 30, 2024
16 of 18 checks passed
@fengmk2 fengmk2 deleted the use-dumi-latest branch December 30, 2024 01:50
Copy link

codecov bot commented Dec 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.36%. Comparing base (a09b1cf) to head (3c44e69).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5378   +/-   ##
=======================================
  Coverage   88.36%   88.36%           
=======================================
  Files          39       39           
  Lines        3772     3772           
  Branches      338      338           
=======================================
  Hits         3333     3333           
  Misses        439      439           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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