You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: astro-docs/src/content/docs/reference/Nx Cloud/launch-templates.mdoc
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -738,3 +738,20 @@ launch-templates:
738
738
# This is a safer approach to prevent leaking tokens/passwords
739
739
echo "SOME_VALUE: $SOME_VALUE"
740
740
```
741
+
742
+
## Nx Workspace in a Subdirectory
743
+
744
+
If your Nx workspace is in a subdirectory of your repository, set `NX_WORKING_DIRECTORY` in your launch template:
745
+
746
+
```yaml
747
+
launch-templates:
748
+
my-template:
749
+
resource-class: 'docker_linux_amd64/medium'
750
+
image: 'ubuntu22.04-node20.11-v9'
751
+
env:
752
+
NX_WORKING_DIRECTORY: './client'
753
+
init-steps:
754
+
# ...
755
+
```
756
+
757
+
The `install-node-modules` step automatically respects this variable (but can be overridden at the step level if your lockfile is hosted at the root). For other steps, set the working directory manually.
Copy file name to clipboardExpand all lines: astro-docs/src/content/docs/reference/environment-variables.mdoc
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,7 @@ Similar to the Nx CLI, Nx Cloud also used the `NX_VERBOSE_LOGGING` environment v
86
86
| `NX_CLOUD_NO_TIMEOUTS` | boolean | Disables the default 10-second timeout for Nx Cloud requests. |
87
87
| `NX_NO_CLOUD` | boolean | If set to `true`, prevents Nx Cloud from being used for the current run. No remote cache will be used. Value cannot be set if using [distributed task execution](/docs/features/ci-features/distribute-task-execution) |
88
88
| `NX_VERBOSE_LOGGING` | boolean | Outputs debug information about agents communicating with the main job. Useful for debugging cache misses and on-premises setup issues. |
89
+
| `NX_WORKING_DIRECTORY` | string | The subdirectory containing your Nx workspace. Set this in your launch template if your Nx workspace is not at the repository root. Only used by Nx Agents. |
0 commit comments