Skip to content

ci(docs): build only docs; fix affected filtering in workflow - #36

Merged
kattsushi merged 1 commit into
masterfrom
docs/ci-docs-only-build
Feb 7, 2026
Merged

kattsushi merged 1 commit into
masterfrom
docs/ci-docs-only-build

Conversation

@kattsushi

@kattsushi kattsushi commented Feb 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary:\n- Build only @effectify/docs by defining explicit build target without dependsOn\n- Update docs workflow to check affected projects and build docs only when affected\n\nFiles changed:\n- .github/workflows/docs.yml\n- apps/docs/project.json\n\nOutcome:\n- CI no longer builds prisma or app projects when docs change\n- Pages deploys only when docs are affected\n

Summary by CodeRabbit

  • Chores
    • Optimized the documentation build pipeline to conditionally build only when documentation files are modified, reducing unnecessary build executions and improving overall CI/CD efficiency.
    • Enhanced project configuration with standardized build, development, and preview workflow targets for improved development processes.

@coderabbitai

coderabbitai Bot commented Feb 7, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The pull request modifies the docs build workflow to conditionally trigger based on whether the @effectify/docs package is affected between commits, and adds explicit Nx run-script targets to the docs project configuration for build, dev, and preview operations.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/docs.yml
Replaced direct nx affected call with a conditional check using nx show projects --affected to determine if @effectify/docs is affected; docs build now skips if not affected. Updated messaging to reflect the new detection logic.
Docs Project Targets
apps/docs/project.json
Added targets section with three nx run-script targets (build, dev, preview), each configured with executor, caching policy, dependencies, and corresponding script values.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 A rabbit hops through docs so fine,
With targets clean and workflows aligned,
When docs are touched, the builds take flight,
Conditional logic—oh what a sight! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and accurately summarizes the main changes: updating the CI workflow to build only docs and fixing the affected project filtering logic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/ci-docs-only-build

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

@nx-cloud

nx-cloud Bot commented Feb 7, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit f02bd13

Command Status Duration Result
nx affected --target=test --base=87c40a1ce45893... ✅ Succeeded 10s View ↗
nx affected --target=lint --base=origin/master ... ✅ Succeeded <1s View ↗
nx affected --target=build --base=87c40a1ce4589... ✅ Succeeded 1s View ↗
nx affected --target=typecheck --base=origin/ma... ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-07 23:52:49 UTC

@kattsushi
kattsushi merged commit e58034d into master Feb 7, 2026
5 of 6 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/docs.yml (1)

88-88: ⚠️ Potential issue | 🟡 Minor

Same backtick issue in skip message.

Same command substitution problem as line 56.

🔧 Proposed fix
-          echo "Skipping deploy - `@effectify/docs` is not affected in this push."
+          echo "Skipping deploy - '@effectify/docs' is not affected in this push."
🤖 Fix all issues with AI agents
In @.github/workflows/docs.yml:
- Line 56: The echo line currently uses backticks around `@effectify/docs` which
causes command substitution; change the string in the echo call (the line
containing "Checking if `@effectify/docs` is affected between ${BASE}..${HEAD}")
to use single quotes or escape the backticks so the literal `@effectify/docs` is
printed (e.g., replace backticks with '\'' or use double quotes without
backticks) and ensure the ${BASE} and ${HEAD} variables still expand as
intended.

else
echo "Running nx affected build for `@effectify/docs` between ${BASE}..${HEAD}"
pnpm nx affected -t build --base="${BASE}" --head="${HEAD}" --projects="@effectify/docs"
echo "Checking if `@effectify/docs` is affected between ${BASE}..${HEAD}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Backticks trigger command substitution in bash.

The backticks around @effectify/docs will be interpreted as command substitution, not literal text. This will cause bash to try executing @effectify/docs as a command, producing an error or unexpected output.

🔧 Proposed fix: escape the backticks or use single quotes
-            echo "Checking if `@effectify/docs` is affected between ${BASE}..${HEAD}"
+            echo "Checking if '@effectify/docs' is affected between ${BASE}..${HEAD}"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
echo "Checking if `@effectify/docs` is affected between ${BASE}..${HEAD}"
echo "Checking if '@effectify/docs' is affected between ${BASE}..${HEAD}"
🤖 Prompt for AI Agents
In @.github/workflows/docs.yml at line 56, The echo line currently uses
backticks around `@effectify/docs` which causes command substitution; change the
string in the echo call (the line containing "Checking if `@effectify/docs` is
affected between ${BASE}..${HEAD}") to use single quotes or escape the backticks
so the literal `@effectify/docs` is printed (e.g., replace backticks with '\'' or
use double quotes without backticks) and ensure the ${BASE} and ${HEAD}
variables still expand as intended.

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