anthony-nouy / tensap

Tensor Approximation Package: a Python package for the approximation of functions and tensors.
https://anthony-nouy.github.io/sphinx/tensap/master/
Other
20 stars 11 forks source link

Automatically publish sphinx doc #7

Closed jschueller closed 4 years ago

jschueller commented 4 years ago

This allows to publish the sphinx doc to anthony-nouy.github.io/sphinx/tensap/master

This will need a few more steps after merge for travis to have the rights to push to anthony-nouy.github.io securely:

Step 1: generate an access token (check the "repo" box), this will be used to give travis the rights: https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token

Step 2: encrypt the token into the .travis.yml: this will avoid to leak the token in travis logs and secure the access, (you will need to install the travis ruby module):

apt install ruby-dev
gem install travis --user
cd tensap
PATH=$HOME/.gem/ruby/2.5.0/bin:$PATH travis encrypt GH_TOKEN=###########################################

where ########## is your travis token follow the intructions of the travis encrypt command:

Shell completion not installed. Would you like to install it now? |y| n
Detected repository as jschueller/tensap, is this correct? |yes| 
Please add the following to your .travis.yml file:

  secure: "gXbglLZ23M...iTw="

Step 3: Add the secure env to the .travis.yml file: Just paste the string generated at the previous step, the .travis.yml should look like this:

...
  - git push --quiet origin master > /dev/null 2>&1

env:
  global:
    secure: "exGxIfCYRlG/1....tIf9k="