folder A
-> repository A
-> Travis
-> repository B
gem install travis
go to folder A
$ travis login
$ ssh-keygen -f deploy_key
$ cat deploy_key.pub
Github repository B : Setting -> Deploy keys
$ travis encrypt-file deploy_key
openssl aes-256-cbc -K $encrypted_b811b6a1fc44_key -iv $encrypted_b811b6a1fc44_iv -in deploy_key.enc -out deploy_key -d
!.travis.yml
!deploy_key.enc
deploy_key
deploy_key.pub
after_success:
# prepare
- openssl aes-256-cbc -K $encrypted_b811b6a1fc44_key -iv $encrypted_b811b6a1fc44_iv -in deploy_key.enc -out ~/.ssh/id_rsa -d
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host github.com" >> ~/.ssh/config
- echo -e "\n\tUser git" >> ~/.ssh/config
- echo -e "\n\tStrictHostKeyChecking no" >> ~/.ssh/config
- echo -e "\n\tIdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config
- echo -e "\n\tIdentitiesOnly yes" >> ~/.ssh/config
- echo -e "\n\tForwardAgent yes" >> ~/.ssh/config
- git config --global user.email "callmekohei@gmail.com"
- git config --global user.name "callmekohei"
# git operations
- cd ..
- git clone git@github.com:callmekohei/deoplete-fsharp-bin.git
- rm -rf ./deoplete-fsharp-bin/bin_deopletefs
- cp -rf ./deopletefs/bin_deopletefs ./deoplete-fsharp-bin/
- cd ./deoplete-fsharp-bin
- git add --all
- git commit -m "by Travis CI (JOB $TRAVIS_JOB_NUMBER)"
- git push origin master