Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Manual deployment for travis & pkgdown

SSH for travis-pkgdown

In the .ssh directory, we should have:

id_rsa & id_rsa.pub - the default keys for this computer

In addition, you need a distinct set of keys for each repository. Accordingly, each of these would be a directory within .ssh:

  • gh-deploy-vegawidget
  • gh-deploy-altair
  • etc.

To generate the keys:

ssh-keygen -t rsa -b 4096 -C "ian.lyttle@schneider-electric.com"

Adjust path to save id_rsa to the particular directory.

Copy id_rsa.pub to Settings > Deploy Keys for the GitHub repository.

cat id_rsa.pub | pbcopy

Copy is_rsa to Travis, as a secret environment-variable.

openssl base64 -A -in id_rsa | pbcopy

As @AliciaSchep notes below, pbcopy is particular to MacOS. If you are using Ubuntu, replace pbcopy with xclip -selection clipboard.

Go to Travis and add this as a secret environment-variable (id_rsa) for the repository (do not "display value in build log").

In your repository, create a "blank" gh-pages branch, from help for pkgdown::deploy_site_pkgdown():

git checkout --orphan gh-pages
git rm -rf .
git commit --allow-empty -m 'Initial gh-pages commit'
git push origin gh-pages
git checkout master
@ijlyttle
Copy link
Author

ijlyttle commented Jun 28, 2019

Thanks, @AliciaSchep!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment