Building docs on travis ci
Documentation and Travis CI
The Docathon Team, Matthias Bussonnier
March 6, 2017
Physicist Bipophysics Software
(Terribheu Freignch Akheucent)
What is Travis-CI
• CI stand for “Continuous Integration”
• Can run unit-test in isolation and complain if test fail
• But Travis can run almost arbitrary code ...
let’s use it for documentation
Why for Documentation ?
• Documentation is never complete, and evolve with your
• Your project is (likely) already setup for Travis
• One less thing to think about, or configure, keep credential.
• Commits lands on the repository.
• Travis builds and checks the docs.
• If branch is “master”, push to GitHub Pages (for example)
If Master branch
The tricky part
• Give Credential to Travis to push back to GitHub
• Well, obviously not in plaintext.
• If you committed once as plaintext: Change it.
• Use “$ travis encrypt” to encrypt ssh keys.
• Don’t “echo ENCRYPTED_VARIABLE”
• Hands on tomorrow at The Hacker Within:
• Every* Tuesday from 4pm to 4:30pm, Here
Let’s use Magic
• You likely don’t want to know how ssh/GitHub Api... etc.
So let’s use DocTr (DOCumentation, TRavis)
• Sets up credential for you
• Tells you what to copy-past in travis.yml
• Find the documentation folder
• Push on GitHub
• $ pip install doctr
• $ doctr configure
• And follow instruction
• Push a commit
( Quick the attendees are hungry )