marinebon / p2p

Pole to Pole website
https://marinebon.github.io/p2p
3 stars 1 forks source link

create _travis.yml #2

Closed 7yl4r closed 5 years ago

7yl4r commented 5 years ago

The ultimate plan here is to get Travis CI to build the Rmd into html, right?

I am not exactly certain how to set up the _travis.yml to do that but have a rough idea. Have you done this on another repo, @bbest ? It would be great to see an example.

7yl4r commented 5 years ago

Hey @eqmh : so I'm looking at the latest travis build and it looks like the Rscript -e 'sessionInfo()' is throwing an error because of a missing DESCRIPTION. I don't know much about it because this is an R thing, but I copied the .travis.yml from marinebon.github.io so we might try copying more things over from there.

7yl4r commented 5 years ago

Yep, that got us to the next step. Now it is failing at the github push because of the auth token.

Now we just need to set up the github auth stuff explained in these notes.

Not sure if that is in travis-ci settings or maybe something more complicated like encryption keys.

bbest commented 5 years ago

Yep, per Encryption keys - Travis CI, you'll need to install the travis Ruby command line to encrypt a variable on your local machine like:

# install Ruby command
gem install travis

# encrypt github password for upload
travis encrypt gh_passwd="secretvalue"

Check out this example: setup Travis continuous integration (CI) to update daily · Issue #2 · SustainSB/sustainsb.github.io

eqmh commented 5 years ago

thanks, @bbest!

Just a quick note for future reference: I got this message when installing travis: You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory

I solved this using: sudo gem install travis (I found it here)

Just running gem install travis was not working for me.

I got the key after running travis encrypt SOMEVAR="secretvalue" and replaced the one that was in the .travis.yml.

I think we have a new set of issues with Travis.

7yl4r commented 5 years ago

xkcd#149

The authentication is still failing in travis:

0.32s$ git push https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git HEAD:${TRAVIS_BRANCH}
remote: Anonymous access to marinebon/p2p.git denied.
fatal: Authentication failed for 'https://@github.com/marinebon/p2p.git/'
The command "git push https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git HEAD:${TRAVIS_BRANCH}" exited with 128.

Did you do literally travis encrypt SOMEVAR="secretvalue" or more like travis encrypt GH_TOKEN="your_token_from_github"? That long string in .travis.yml encrypts whatever string you give it and the string needs to set the GH_TOKEN variable.

eqmh commented 5 years ago

Travis CI seems to be working now. Closing this one out