YuJianghao/winwin-hexo-editor

Click deploy(部署) button failed.

LunaGao opened this issue · 2 comments

When I click the deploy(部署) button, it shows up the failed.

71585156678_ pic_副本

Have you configured your hexo deploy command?

As the notificaiton said, deploy configuation is not found. 503 means server can't find deploy.type in your hexo config file _config.yml, which means hexo deploy can't work.

If you are sure that you can deploy your blog by running hexo g -d. You can open ./hexo-editor/node_modules/@winwin/hexo-editor-server/src/hexo.js and comment line 454 to line 459. As follow

  /**
   * 部署网站
   */
  async deploy () {
    this._checkReady()
    // if (!this.canDeploy) {
    //   const err = new Error()
    //   err.name = 'Hexo Cant Deploy'
    //   err.message = 'No deploy config found. Can\'t deploy.'
    //   throw err
    // }
    debug('deploy')
    return this._runShell('hexo clean;hexo generate -d')
  }

And could I have your deploy part of hexo _config.yml file? something like

deploy:
    type: git
    repo: git@blabla.cn:~/repo/blog.git
    branch: master

Sorry, my bad. I didn't setup this config. :(