Skip to content

Conversation

2bndy5
Copy link
Collaborator

@2bndy5 2bndy5 commented Sep 7, 2025

  • only build docs for PRs and pushes to main
  • only deploys docs from main branch

Note

This is really just designed to stop building docs on every push to every branch.

Summary by CodeRabbit

  • Chores
    • Updated documentation deployment workflow to run only for changes on the main branch, reducing unnecessary runs and improving reliability.
    • Added checks on pull requests targeting the main branch to validate documentation build before merging.
    • Manual run option remains available for on-demand deployments.

- only build docs for PRs and pushes to main
- only deploys docs from main branch
@2bndy5 2bndy5 requested a review from a team as a code owner September 7, 2025 19:50
@2bndy5 2bndy5 requested review from shenxianpeng and removed request for a team September 7, 2025 19:50
@2bndy5 2bndy5 added the documentation Improvements or additions to documentation label Sep 7, 2025
Copy link
Contributor

coderabbitai bot commented Sep 7, 2025

Walkthrough

Restricts MkDocs deploy workflow triggers to the main branch for push and pull_request events and retains manual workflow_dispatch. No job or deployment step changes.

Changes

Cohort / File(s) Summary of changes
CI workflow triggers
.github/workflows/mkdocs-deploy.yml
Added push.branches: [main] and pull_request.branches: [main]; kept workflow_dispatch; no job/deployment modifications.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch test-new-docs-deploy

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
Contributor

@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

🧹 Nitpick comments (2)
.github/workflows/mkdocs-deploy.yml (2)

3-8: Avoid wasted CI by canceling superseded runs

Add a concurrency group so newer pushes/PR updates cancel in-flight doc builds.

 name: MkDocs Deploy

 on:
   push:
     branches: [main]
   pull_request:
     branches: [main]
   workflow_dispatch:
 
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true

10-12: Skip builds for draft PRs (run when marked ready)

Prevents building docs for drafts; it will build automatically on ready_for_review.

 jobs:
   build-docs:
+    if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
     uses: cpp-linter/.github/.github/workflows/mkdocs.yml@main
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1da32b5 and 7f9b811.

📒 Files selected for processing (1)
  • .github/workflows/mkdocs-deploy.yml (1 hunks)

@2bndy5 2bndy5 merged commit 0c20ff4 into main Sep 7, 2025
10 checks passed
@2bndy5 2bndy5 deleted the test-new-docs-deploy branch September 7, 2025 20:03
@shenxianpeng shenxianpeng added developer Changes which impact developers and removed documentation Improvements or additions to documentation labels Sep 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer Changes which impact developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants