I'd expect
```python
DOCS_DIR = os.path.join(REPO_DIR, 'docs')
```
after line 58 where REPO_DIR is defined, and then ```if os.path.exists(DOCS_DIR):``` through the code. I'd find this more readable and the location is defined in a single place rather than on line 62 and again on 247.