The B
directory (your usual working directory for development) should have a sister directory A
at the same level, which is checked out to the gh-pages
branch.
# from B directory:
sphinx-apidoc -o ../ndio-docs ./ndio/
cd docs
make html
..
╠═ repo (gh-pages) A
║
╠═ repo (master) B
║ ╠═ docs C
║ ║ ╠═ build
║ ║ ╠═ source
║ ║ ╠═ Makefile
║ ║
║ ╠═ your code... D