Always install CI at the repo root
Author: Arcadi4Created Oct 1, 2026Updated Oct 1, 2026
GitHub only checks the .github directory at the repo root. So it should never be installed anywhere else.
In many cases the CI cannot be correctly installed in the repo root:
- Running
react-doctor ci installin a subdir of a git repo installs to pwd. - Selecting "Yes, add the workflow" in the main CLI flow (
npx react-doctor) installs to the found React project, rather than the root. For example, for a monorepo whereapps/websiteis the only React component, the CLI installs toapps/website/.github/workflow.
Proposed solution:
- Make any CI installation logic search upwards until it locates a
.git; otherwise, throw a warning/error. - Prompt the user for non-pwd installations.
Source: millionco/react-doctor