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
Build: don't run default steps if no sphinx or mkdocs
This PR modifies the build to not run default commands when the user doesn't
specify `sphinx` or `mkdocs` configs in the YAML file.
This allows to use the following YAML file to build with Docusaurus, for
example:
```yaml
version: 2
build:
os: ubuntu-24.04
tools:
nodejs: "22"
jobs:
install:
- cd docs/ && npm install
build:
html:
- cd docs/ && npm run build
post_build:
- mkdir --parents $READTHEDOCS_OUTPUT/html/
- cp --recursive docs/build/* $READTHEDOCS_OUTPUT/html/
```
This is the structure I've been wanting to have to allow any type of doctool to
work in our platform following the `build.jobs` pattern.
The code deployed in production doesn't allow this because it runs automatically
`create_environment`, `install_core_dependencies` and `install_requirements`
even if the project is not using Python --which is incorrect. It fails with the
generic error: " Unknown problem. There was a problem with Read the Docs while
building your documentation"
- https://app.readthedocs.org/projects/test-builds/builds/26425680/
- https://read-the-docs.sentry.io/issues/4458662274/
This PR detects if the user is defining `sphinx` or `mkdocs` and if it's not, it
doesn't run those jobs and leave the user to handle the build workflow
completely.
* Related #11216
* Related #11551
0 commit comments