Skip to content

Conversation

@wuyiping0628
Copy link
Collaborator

@wuyiping0628 wuyiping0628 commented Dec 17, 2025

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • Chores
    • Automated documentation building on pull requests and dev branch updates to ensure documentation consistency and prevent broken builds.

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions github-actions bot added the enhancement New feature or request (功能增强) label Dec 17, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 17, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • examples/sites/demos/pc/webdoc/architecture.png is excluded by !**/*.png

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Introduces a new GitHub Actions workflow that automates building documentation for the main module on pull requests and pushes to the dev branch. The workflow handles SSH authentication, submodule synchronization, dependency installation via pnpm, and documentation build execution with status reporting.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow Configuration
.github/workflows/auto-build-main-module-docs.yml
New workflow file automating main module documentation builds on PR and dev branch pushes, including SSH setup, submodule operations, pnpm dependency management, and build execution with conditional status updates

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

  • SSH authentication setup and credential handling
  • Submodule synchronization logic and branch alignment
  • Conditional status reporting based on build outcome

Poem

🐰 A workflow takes flight, so nimble and bright,
Building docs with each push through the night,
SSH keys dancing with submodules aligned,
PNPM builds treasures, a gift most refined! 📚✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding a new GitHub Actions workflow file for auto-building main module documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

❤️ Share

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

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: 2

🧹 Nitpick comments (2)
.github/workflows/auto-build-main-module-docs.yml (2)

51-57: Consider using --frozen-lockfile for reproducible builds.

The pnpm i command without --frozen-lockfile may install different dependency versions than specified in the lockfile, potentially causing inconsistent builds or unexpected failures in CI.

🔎 Apply this diff to ensure reproducible builds:
       - name: Run main repo build
         id: build
         working-directory: ./docs
         run: |
-          pnpm i
+          pnpm install --frozen-lockfile
           # 如果使用VitePress
           pnpm build

46-49: Update pnpm action-setup to v4 and consider upgrading to pnpm v10.

pnpm v9 requires at least Node.js v18.12, which should be verified in the workflow. More importantly, pnpm/action-setup@v4 is the latest version available, while the workflow uses v3. Additionally, pnpm 9.x is no longer actively maintained; the latest version is 10.x. Consider upgrading both the action to v4 and evaluating a migration to pnpm v10 for continued support and improvements.

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f018f4f and 93d9cb4.

📒 Files selected for processing (1)
  • .github/workflows/auto-build-main-module-docs.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.9)
.github/workflows/auto-build-main-module-docs.yml

27-27: "github.head_ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details

(expression)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: verify-main-build
🔇 Additional comments (2)
.github/workflows/auto-build-main-module-docs.yml (2)

59-68: LGTM! Status reporting logic is correct.

The status check properly uses if: always() to ensure it runs regardless of previous step outcomes, and correctly fails the workflow when the build fails.


17-24: No changes needed—both authentication methods are necessary.

The SSH key authenticates access to private submodules within the external docs repository (cloned on line 26), while the PAT token authenticates checkout of the tiny-vue repository. These serve distinct purposes: SSH for the docs repo's recursive submodule updates (lines 33-34) and PAT for the initial tiny-vue checkout (lines 20-24). The configuration is correct.

@kagol kagol merged commit 24307b9 into dev Dec 18, 2025
6 checks passed
@kagol kagol deleted the wyp/add-bulid-yml-1217 branch December 18, 2025 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request (功能增强)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants