No commit activity in last 3 years
No release in over 3 years
Deploy your ruby based applications to your own servers
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.7.0
>= 0
~> 10.1.1
~> 1.2.2
~> 1.1.2
~> 2.14.1

Runtime

~> 2.1.2
 Project Readme

travis-custom-deploy Gem Version

Build Status Coverage Status Code Climate Dependency Status

Deploy static files with Travis-CI to your own server.

Configuration

Add the gem to your Gemfile or gemspec.

gem "travis-custom-deploy", "~> 0.0.6"

To use travis-custom-deploy with Travis-CI you need to define environment variables. I recommend to use secure environment variables with Travis-CI. The best way to do that is to use travis gem:

gem install travis
cd my_project
travis encrypt DEPLOY_HOST="your-hostname.com" --add
travis encrypt DEPLOY_USERNAME="username" --add
travis encrypt DEPLOY_PASSWORD="password" --add
travis encrypt DEPLOY_REMOTEDIR="/path/to/deploy/" --add

To trigger the deployment you have to add the following line to your ~/.travis.yml file:

after_success: bundle exec travis-custom-deploy sftp _site/

Example:

language: ruby
rvm: 2.0.0
env:
  global:
  - secure: <hash>
  - secure: <hash>
  - secure: <hash>
  - secure: <hash>
script:
- bundle exec jekyll build --trace
- bundle exec ./script/htmlcheck

after_success: bundle exec travis-custom-deploy sftp _site/

Protocol support

The protocol to use to transfer the files to the remote server.

SFTP

Necessary environment variables:

  • DEPLOY_HOST
  • DEPLOY_USERNAME
  • DEPLOY_PASSWORD
  • DEPLOY_REMOTEDIR

Example:

after_success: bundle exec travis-custom-deploy sftp files/

Services

There are predefined services available. For example if you want to deploy a Jekyll page you can write:

after_success: travis-custom-deploy sftp service:jekyll

Services currently availble:

Service  File
-------- -------
jekyll   _site/

License and Copyright

Licensed under the MIT license.

Jens Nazarenus, 2014