Skip to content

Latest commit

 

History

History
63 lines (49 loc) · 1.88 KB

README.md

File metadata and controls

63 lines (49 loc) · 1.88 KB

hexo-deployer-rsync

Build Status NPM version

Rsync deployer plugin for Hexo.

Installation

$ npm install hexo-deployer-rsync --save

Options

You can configure this plugin in _config.yml.

deploy:
  type: rsync
  host: <host>
  user: <user>
  root: <root>
  port: [port] # Default is 22
  delete: [true|false] # Default is true
  progress: [true|false] # Default is true
  dotenv: [true|false] # Default is false
  args: <rsync args>
  rsh: <remote shell>
  key: <key>
  verbose: [true|false] # Default is true
  ignore_errors: [true|false] # Default is false
  create_before_update: [true|false] # Default is false
  • host: Address of remote host
  • user: Username
  • root: Root directory of remote host
  • port: Port
  • delete: Delete old files on remote host
  • progress: Show rsync progress
  • args: Rsync arguments
  • rsh: Specify the remote shell to use
  • key: Custom SSH private key
  • verbose: Display verbose messages
  • ignore_errors: Ignore errors
  • create_before_update: First create non-existing files, then update existing files

Env based options

When deploy.dotenv config option is set to TRUE, some options can be ommitted and they will be loaded from following ENV variables instead:

  • HEXO_RSYNC_HOST -> maps to deploy.host
  • HEXO_RSYNC_PORT -> maps to deploy.port
  • HEXO_RSYNC_USER -> maps to deploy.user
  • HEXO_RSYNC_ROOT -> maps to deploy.root

This can be useful in a situation when you do not want to store your SSH details in the repository, but load them from your deployment environment.

License

MIT