ci(docs): build only docs; fix affected filtering in workflow - #36
Conversation
📝 WalkthroughWalkthroughThe pull request modifies the docs build workflow to conditionally trigger based on whether the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 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)
Comment |
|
View your CI Pipeline Execution ↗ for commit f02bd13
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
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 | 🟡 MinorSame 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}" |
There was a problem hiding this comment.
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.
| 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.
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