fix/drop -it from docs-build target#17
Merged
Merged
Conversation
The docs-build target runs a non-interactive mkdocs build, but the docker run flags include -it which requires a TTY. The new GitHub Actions docs deploy workflow has no TTY (Travis happened to provide one), so the build fails with "the input device is not a TTY". -i/-t aren't needed for a one-shot build, so just drop them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Removes Docker’s interactive TTY flags from the docs-build Makefile target so the GitHub Actions docs deploy workflow can run non-interactively without failing on “the input device is not a TTY”.
Changes:
- Update
docs-buildto rundocker run --rm ... buildwithout-itto avoid requiring a TTY in CI.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The new GitHub Actions docs deploy workflow (added in #16) calls `make docs-build`, which fails on every push to `main` with:
```
the input device is not a TTY
make: *** [Makefile:91: docs-build] Error 1
```
See https://github.com/graze/sprout/actions/runs/25489756405/job/74794449988 for the failure.
Root cause
`docs-build` runs:
```
docker run --rm -it -v $$(pwd):/docs squidfunk/mkdocs-material build
```
`-it` requires a TTY. Travis happened to allocate one, so the target worked there. GitHub Actions runners don't, so docker exits non-zero before mkdocs ever starts.
`mkdocs build` is non-interactive and has no use for stdin or a tty, so the flags are just dead weight.
Notable changes
`docs-test` and `docs-deploy` are intentionally untouched. `docs-test` is interactive on purpose; `docs-deploy` isn't called from CI (the workflow uses `peaceiris/actions-gh-pages` instead).
QA