OAuth tokens for doc deployment

Oliver Beckstein edited this page May 9, 2017 · 1 revision

In order for Travis CI to manipulate GitHub repositories one needs to provide authorization. This can be done with GitHub OAuth tokens. A OAuth token is issued by a person (e.g., @orbeckst), can be limited in scope (e.g., only public repos), and grants the same permissions that the person has (limited by the scope).

Notes on how to use OAuth tokens in the management of MDAnalysis doc deployment had previously been collected in issue #386.

Automatic doc deployment

Following Automatically Update Github Pages with Travis Example seems straighforward enough in order to have travis-ci build the sphinx docs and then push them to the gh-pages branch.

Potential solutions

Using OAuth for doc deployment

  1. generated OAUTH token (limit scope to public_repo access; I used the tokens web interface but can also be done via curl as described in the awestruct gh deployment notes). IMPORTANT: You MUST get the token at this stage and save it to a file; this is the only time that you get to see the token. For the following, we call this file github_OAUTH_token_SECRET. KEEP THE TOKEN SECRET, never commit!!
  2. encrypt for travis with the travis client:
gem2.0 install travis
travis encrypt GH_TOKEN=`cat ./github_OAUTH_token_SECRET`

yields the entry for the .travis.yml file:

 secure: "HIj3p+p2PV8DBVg/KGUx6n83KwB0ASE5FwOn0SMB9zxnzAqe8sapwdBQdMdq0sXB7xT1spJqRxuxOMVEVn35BNLu7bxMLfa4287C8YXcomnvmv9xruxAsjsIewnNQ80vtPVbQddBPxa4jKbqgPby5QhhAP8KANAqYe44pIV70fY="

(This is encrypted with the travis public key. For more details, see Travis CI: Encryption keys.) 3. add lines to .travis.yml along the lines of

  - ./testsuite/MDAnalysisTests/mda_nosetests -v --with-coverage --cover-package MDAnalysis --processes=2 --process-timeout=120 --with-memleak
  - coveralls
  - test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "develop" && cd package/doc/sphinx && make clean html

  - test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "develop" && bash maintainer/deploy.sh

      secure: "HIj3p+p2PV8DBVg/KGUx6n83KwB0ASE5FwOn0SMB9zxnzAqe8sapwdBQdMdq0sXB7xT1spJqRxuxOMVEVn35BNLu7bxMLfa4287C8YXcomnvmv9xruxAsjsIewnNQ80vtPVbQddBPxa4jKbqgPby5QhhAP8KANAqYe44pIV70fY="

(We want to build the developer docs when we push an update to the developer branch.)

Project Information

GNU GPL v2 code license
Labels: python, molecular dynamics, analysis, DCD, CHARMM, LAMMPS, NAMD, Gromacs, computer simulation, atoms, coordinates, trajectory, XTC, Library, object-oriented
Core Developers


Release Notes
Guide for Developers
Google Summer of Code

Code of Conduct


@mdanalysis on Twitter
Downloads (PyPi)
Mailing Lists:
User discussion group
Developer mailing list

Clone this wiki locally
You can’t perform that action at this time.
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.
Press h to open a hovercard with more details.