Last active
May 31, 2018 01:26
-
-
Save valeriabarros/a443783ce04c20e38fe60fb404a484a3 to your computer and use it in GitHub Desktop.
Jekyll deploy using Travis CI by SSH
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: ruby | |
rvm: | |
- 2.4 | |
env: | |
global: | |
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true | |
- secure: hash | |
- secure: hash | |
- secure: hash | |
branches: | |
only: | |
- stable #yourBranch | |
install: gem install jekyll #install jekyll | |
script: | |
- jekyll build #build jekyll | |
before_deploy: | |
- openssl aes-256-cbc -K $encrypted_hash_key -iv $encrypted_hash_iv | |
-in deploy_rsa.enc -out deploy_rsa -d | |
- eval "$(ssh-agent -s)" | |
- chmod 600 deploy_rsa | |
- ssh-add deploy_rsa | |
- echo -e "Host $DEPLOY_HOST\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config | |
sudo: false | |
deploy: | |
provider: script | |
skip_cleanup: true | |
script: rsync -r --quiet --delete-after _site/* $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIRECTORY | |
on: | |
branch: stable | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment