Skip to content

automatically deploy development docs #386

@orbeckst

Description

@orbeckst

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. (See also the discussion at the bottom of #350.)

Potential solutions

Progress so far

  • 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). DONE

  • encrypt for travis with the travis client:

    gem2.0 install travis
    travis encrypt GH_TOKEN=`cat ./github_OAUTH_token`
    

    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.)

  • add lines to .travis.yml along the lines of

    script:
      - ./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
    
    after_success:
      - test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "develop" && bash maintainer/deploy.sh
    
    env:
       global:
          secure: "HIj3p+p2PV8DBVg/KGUx6n83KwB0ASE5FwOn0SMB9zxnzAqe8sapwdBQdMdq0sXB7xT1spJqRxuxOMVEVn35BNLu7bxMLfa4287C8YXcomnvmv9xruxAsjsIewnNQ80vtPVbQddBPxa4jKbqgPby5QhhAP8KANAqYe44pIV70fY="

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

    I don't know if an error during doc building will then also signal a failure of a build. Perhaps doc building should be put in a sub shell (e.g., - (cd package/doc/sphinx && make html); true) and always return success?

  • Write a maintainer/deploy.sh script (or rake or whatever):

    • It will need to init a git repo in the package/doc/html dir and push this cleanly to the gh-pages branch. (This will also have the advantage that the docs will appear nicely as http://www.mdanalysis.org/mdanalysis/index.html )
    • As commit author we could use the fake Travis CI <TravisCI@mdanalysis.org>.
  • test on a feature branch without screwing up our repo...

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions