Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,13 @@ jobs:
echo "No valid BASE commit found, building unconditionally"
pnpm nx build "@effectify/docs"
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.

if pnpm nx show projects --affected --base="${BASE}" --head="${HEAD}" | grep -q "@effectify/docs"; then
echo "@effectify/docs is affected. Building only docs..."
pnpm nx build "@effectify/docs"
else
echo "@effectify/docs not affected. Skipping build."
fi
fi
if [ -d apps/docs/dist ]; then
echo "should_deploy=true" >> "$GITHUB_OUTPUT"
Expand Down
29 changes: 28 additions & 1 deletion apps/docs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,32 @@
"name": "@effectify/docs",
"projectType": "application",
"sourceRoot": "apps/docs/src",
"tags": ["docs"]
"tags": ["docs"],
"targets": {
"build": {
"executor": "nx:run-script",
"cache": true,
"inputs": ["production"],
"dependsOn": [],
"options": {
"script": "build"
}
},
"dev": {
"executor": "nx:run-script",
"cache": false,
"dependsOn": [],
"options": {
"script": "dev"
}
},
"preview": {
"executor": "nx:run-script",
"cache": false,
"dependsOn": [],
"options": {
"script": "preview"
}
}
}
}