One-Command Deployment

Hexo provides a fast and easy deployment strategy. You only need one single command to deploy your site to your server.

1
$ hexo deploy

Install the necessary plugin(s) that is compatible with the deployment method provided by your server/repository.

Deployment is usually configured through _config.yml. A valid configuration must have the type field. For example:

1
2
deploy:
type: git

You can use multiple deployers. Hexo will execute each deployer in order.

1
2
3
4
5
deploy:
- type: git
repo:
- type: heroku
repo:

Refer to the Plugins list for more deployment plugins.

Git

  1. Install hexo-deployer-git.
    1
    $ npm install hexo-deployer-git --save
  2. Edit _config.yml (with example values shown below as comments):
    1
    2
    3
    4
    5
    deploy:
    type: git
    repo: <repository url> # https://bitbucket.org/JohnSmith/johnsmith.bitbucket.io
    branch: [branch]
    message: [message]