Local readthedocs build succeeds while production build fails due to environment and caching differences
0 reputation · 27 Sept 2020, 07:37 UTC
Readthedocs builds documentation using a configuration file (conf.py) and environment variables that may differ between a developer’s machine and the production CI environment.
The configuration may rely on locally installed Python packages or environment variables that are not present in the CI image, causing import failures or missing setup steps only in production.
Additionally, local caching of generated HTML can mask stale documentation, so the production pipeline may serve outdated content unless the cache is explicitly cleared.
How does the presence or absence of environment variables in the CI environment affect readthedocs configuration execution? What impact does local HTML caching have on the versioning of documentation served in production?