initc3 / HoneyBadgerMPC

Robust MPC-based confidentiality layer for blockchains
GNU General Public License v3.0
131 stars 64 forks source link

Add scripts to deploy docs to github pages #412

Closed sbellem closed 4 years ago

sbellem commented 4 years ago

The main goal of this PR is to add logic to Travis CI to deploy documentation to Github Pages: https://initc3.github.io/HoneyBadgerMPC.

In order to speed up the builds that are done for branches that are on the initc3/HoneyBadgerMPC repo Docker Hub is used a cache: a build stage is added to build a docker image and push it to Docker Hub for subsequent re-use in other stages/jobs.

For now, the deployment of documentation will only be done for the dev branch, on initc3/HoneyBadgerMPC, referred as the DOCS_DEPLOY_BRANCH. When code is merged into the dev branch, if all tests and quality checks succeed, and if the documentation was generated with success then the docs are published to github pages. If the docs have not changed the deployment will not take place.

Depending on whether a pull request or push event is from a fork or not the Travis CI build will differ. The main cases/events are:

  1. push to a branch on a fork, e.g. cosmicbadgers/HoneyBadgerMPC (example)
  2. push to a branch (not dev) on initc3/HoneybadgerMPC (example)
  3. pull request from a branch of a fork, e.g. sbellem/HoneyBadgerMPC (example (this pull request))
  4. pull request from a branch of initc3/HoneyBadgerMPC (example)
  5. push to the dev branch (DOCS_DEPLOY_BRANCH) on initc3/HoneybadgerMPC (example -- note that the DOCS_DEPLOY_BRANCH is not dev for the example)

TODO:

codecov[bot] commented 4 years ago

Codecov Report

Merging #412 into dev will decrease coverage by 0.01788%. The diff coverage is n/a.

@@                 Coverage Diff                 @@
##                 dev        #412         +/-   ##
===================================================
- Coverage   77.23533%   77.21745%   -0.01789%     
===================================================
  Files             50          50                 
  Lines           5592        5592                 
  Branches         856         856                 
===================================================
- Hits            4319        4318          -1     
- Misses          1098        1099          +1     
  Partials         175         175