Skip to content

Instantly share code, notes, and snippets.

@sabrinaluo
Created December 28, 2015 05:05
Show Gist options
  • Save sabrinaluo/d905eeed53d9368fdee6 to your computer and use it in GitHub Desktop.
Save sabrinaluo/d905eeed53d9368fdee6 to your computer and use it in GitHub Desktop.
.travis.yml for hexo blog
language: node_js
node_js:
- '4.0'
branches:
only:
- master
before_install:
- openssl aes-256-cbc -K $encrypted_e011a6d7eebf_key -iv $encrypted_e011a6d7eebf_iv -in .travis/id_rsa.enc -out ~/.ssh/id_rsa -d
- chmod 600 ~/.ssh/id_rsa
- eval $(ssh-agent)
- ssh-add ~/.ssh/id_rsa
- cp .travis/ssh_config ~/.ssh/config
- npm install -g hexo
before_script:
- git config --global user.name 'Sabrina Luo'
- git config --global user.email '[email protected]'
- git clone --depth=1 [email protected]:sabrinaluo/hexo-theme-replica.git themes/replica
##clone gh-pages branch only, into .deploy_git folder, so that commit history can be kept
- git clone [email protected]:sabrinaluo/tech.git -b gh-pages --single-branch .deploy_git
script:
- hexo generate
after_success:
- hexo d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment