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 "[email protected]"
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
Very helpful @ijlyttle ! One comment for anyone following this on ubuntu rather than macos...
pbcopy
should be replaced withxclip -selection clipboard