hexojs / hexo-deployer-git Goto Github PK
View Code? Open in Web Editor NEWGit deployer plugin for Hexo.
License: MIT License
Git deployer plugin for Hexo.
License: MIT License
This plugin seems seems to use an 'anti-pattern' to deploy sites to Github as a very different repository than what I have in my working directory. I don't know if I have it misconfigured or what, but I end up with a completely different repository layout on Github when using hexo-deployer-git than what I started with on my machine -- and I don't like that. It's a pretty bad misuse of git, I think.
I had everything setup and working using hexo server
, but when I deployed it, my CNAME
file and atom.xml
file were missing. I'm using runlevelsix.github.io
as my repo name - which does not use a gh-pages
branch - only the master
branch.
In the _config.yml
file, I expected I could set the config.public_dir
to something like the current directory, but that failed to have the expected results - pretty much all of my source files were deleted (major problem)...
Is this a git deployer issue, a haxo issue, or a github pages issue?
Hello,
I executed hexo generate --deploy
today to deploy my page to: https://bennyn.github.io/internet-of-chili/
The command deployed the page (which is pretty cool) but all resources (like bootstrap/css/bootstrap.min.css
) are missing. Maybe you can help me to find out why.
My deployment configuration is this:
_config.yml
deploy:
type: git
repo: [email protected]:bennyn/internet-of-chili.git
branch: gh-pages
And I am using the clean-blog theme.
My project is located here:
Did I forgot to configure something? Because I can see that the expected bootstrap
directory is missing in my gh-pages
branch. 😢
I want to write my hexo blog on two computers , however, when I used two computers to do this thing, the commited history will be overwriten by each other.
From @RanchoCooper on June 8, 2016 18:42
如下
warning: 在 Git 2.0 版本,位于一个子目录下不带任何路径参数地执行命令
'git add --all (或 -A)' 的行为将被改变,不要再继续使用了。
如果要添加整个目录树的内容,执行:
git add --all :/
(或 git add -A :/)
如果要限制该命令只作用于当前目录,执行:
git add --all .
(或 git add -A .)
对于当前版本的 Git,这条命令只作用于当前目录。
Copied from original issue: hexojs/hexo#1997
Any work around?
Hi.
Some directories don't appear on the web because of Jekyll.
I found out a solution from the internet: .nojekyll
file has to be added to the root directory after deployment. Currently, I add that file manually every time after deployment.
Could you add it to the deploying process?
thanks.
In a .deploy_git
repo, if the src refspec
is NOT master
, deploy would fail.
e.g. The src refspec
is pages
in https://travis-ci.org/h404bi/notes/builds/63832305
498 error: src refspec master does not match any.
The problem is that because in lib deployer.js
, src refspec
is specified to master
:
https://github.com/hexojs/hexo-deployer-git/blob/master/lib/deployer.js#L71
return git('push', '-u', repo.url, 'master:' + repo.branch, '--force');
Remove 'master:' +
should solve the problem, maybe has other solutions.
return git('push', '-u', repo.url, repo.branch, '--force');
提示 ERROR Deployer not found: git
配置里是有相应配置段的
deploy:
type: git
repo: https://github.com/ycf-FED/ycf-FED.github.io.git
branch: master
What's the reason?
And i delete .deploy_git folder, it will block like this:
create mode 100644 js/pace.js
create mode 100644 js/pc.js
create mode 100644 js/pc.js.bak
create mode 100644 js/plugins.js
create mode 100644 js/raphael.js
create mode 100644 js/sequence-diagram.js
create mode 100644 js/underscore.js
delete mode 100644 placeholder
create mode 100644 tags/flowchart-js/index.html
create mode 100644 tags/gdb/index.html
create mode 100644 tags/js-sequece-diagrams/index.html
create mode 100644 tags/toc/index.html
just block here, and I don't know what's wrong
From @JoshPAT on May 18, 2015 22:15
INFO Deploying: git
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
TypeError: undefined is not a function
at Object.exports.parse (/Users/JoshPAT/Documents/my_blog/node_modules/hexo-deployer-git/node_modules/swig/lib/parser.js:438:19)
at parse (/Users/JoshPAT/Documents/my_blog/node_modules/hexo-deployer-git/node_modules/swig/lib/swig.js:354:19)
at Object.precompile (/Users/JoshPAT/Documents/my_blog/node_modules/hexo-deployer-git/node_modules/swig/lib/swig.js:486:23)
at Object.compile (/Users/JoshPAT/Documents/my_blog/node_modules/hexo-deployer-git/node_modules/swig/lib/swig.js:606:16)
at commitMessage (/Users/JoshPAT/Documents/my_blog/node_modules/hexo-deployer-git/lib/deployer.js:95:15)
at Hexo.module.exports (/Users/JoshPAT/Documents/my_blog/node_modules/hexo-deployer-git/lib/deployer.js:21:17)
at Hexo.tryCatcher (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/util.js:24:31)
at Hexo.<anonymous> (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/method.js:15:34)
at /Users/JoshPAT/Documents/my_blog/node_modules/hexo/lib/plugins/console/deploy.js:56:28
at tryCatcher (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/util.js:24:31)
at ReductionPromiseArray._promiseFulfilled (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/reduce.js:103:38)
at ReductionPromiseArray.init [as _init$] (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/promise_array.js:92:18)
at Promise._settlePromiseAt (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:528:21)
at Promise._settlePromises (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:646:14)
at Async._drainQueue (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:177:16)
at Async._drainQueues (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:187:10)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:15:14)
at processImmediate [as _immediateCallback] (timers.js:358:17)
btw, I am using Mac OS 10.9.5...
Copied from original issue: hexojs/hexo#1280
The gist is to
git clone <gh-pages repo> .deploy_git
before hexo d
.
Hola! @malikperang has created a ZenHub account for the hexojs organization. ZenHub is the only project management tool integrated natively in GitHub – created specifically for fast-moving, software-driven teams.
To get set up with ZenHub, all you have to do is download the browser extension and log in with your GitHub account. Once you do, you’ll get access to ZenHub’s complete feature-set immediately.
ZenHub adds a series of enhancements directly inside the GitHub UI:
Still curious? See more ZenHub features or read user reviews. This issue was written by your friendly ZenHub bot, posted by request from @malikperang.
我的配置:
# Deployment
## Docs: http://hexo.io/docs/deployment.html
deploy:
type: git
repo: https://github.com/MarcoPai/MarcoPai.github.io.git
branch: master
输入 hexo d 之后的报错:
INFO Copying files from public folder...
events.js:85
throw er; // Unhandled 'error' event
^
Error: spawn git ENOENT
at exports._errnoException (util.js:746:11)
at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
at child_process.js:1144:20
at process._tickCallback (node.js:355:11)
RT
If you have hidden file (with trailing .), the file will not be deployed into git. This blocks adding .nojekyll file for github files.
fs.copyDir(publicDir, deployDir) ignores hidden file by default.
I have created a generator that generates an .htaccess file in the public directory as expected when I execute the hexo generate
command.
Unfortunately, I cannot seem to get the git deployer to generate this file in the .deploy_git directory. I have tried setting ignore_hidden: false
which did not work, nor did specifically setting the public directory to ignore_hidden to false.
This pattern has worked for me in the past, although with files that do not start with a .
My generator is as follows:
var fs = require('hexo-fs');
var path = require('path');
hexo.extend.generator.register('htaccess', function(locals) {
return {
path: '.htaccess',
data: function() {
return fs.createReadStream(path.join(__dirname, '..','.htaccess'));
}
}
});
INFO Deploying: git
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troublesho...
TypeError: undefined is not a function
at Object.exports.parse (/opt/hexo/node_modules/hexo-deployer-git/node_modules/swig/lib/parser.js:438:19)
at parse (/opt/hexo/node_modules/hexo-deployer-git/node_modules/swig/lib/swig.js:354:19)
at Object.precompile (/opt/hexo/node_modules/hexo-deployer-git/node_modules/swig/lib/swig.js:486:23)
at Object.compile (/opt/hexo/node_modules/hexo-deployer-git/node_modules/swig/lib/swig.js:606:16)
at commitMessage (/opt/hexo/node_modules/hexo-deployer-git/lib/deployer.js:95:15)
at Hexo.module.exports (/opt/hexo/node_modules/hexo-deployer-git/lib/deployer.js:21:17)
at Hexo.tryCatcher (/opt/hexo/node_modules/hexo/node_modules/bluebird/js/main/util.js:24:31)
at Hexo. (/opt/hexo/node_modules/hexo/node_modules/bluebird/js/main/method.js:15:34)
at /opt/hexo/node_modules/hexo/lib/plugins/console/deploy.js:56:28
at tryCatcher (/opt/hexo/node_modules/hexo/node_modules/bluebird/js/main/util.js:24:31)
at ReductionPromiseArray._promiseFulfilled (/opt/hexo/node_modules/hexo/node_modules/bluebird/js/main/reduce.js:103:38)
at ReductionPromiseArray.init as _init$
at Promise._settlePromiseAt (/opt/hexo/node_modules/hexo/node_modules/bluebird/js/main/promise.js:528:21)
at Promise._settlePromises (/opt/hexo/node_modules/hexo/node_modules/bluebird/js/main/promise.js:646:14)
at Async._drainQueue (/opt/hexo/node_modules/hexo/node_modules/bluebird/js/main/async.js:177:16)
at Async._drainQueues (/opt/hexo/node_modules/hexo/node_modules/bluebird/js/main/async.js:187:10)
at Immediate.Async.drainQueues as _onImmediate
at processImmediate as _immediateCallback
log from travis-CI is as follow.
The command "hexo g" exited with 0.
$ hexo d
INFO Deploying: git
INFO Setting up Git deployment...
Initialized empty Git repository in /home/travis/build/Xuanwo/xuanwo.github.io/.deploy_git/.git/
[master (root-commit) e047986] First commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 placeholder
INFO Clearing .deploy folder...
INFO Copying files from public folder...
fatal: Unable to create '/home/travis/build/Xuanwo/xuanwo.github.io/.deploy_git/.git/index.lock': File exists.
If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: fatal: Unable to create '/home/travis/build/Xuanwo/xuanwo.github.io/.deploy_git/.git/index.lock': File exists.
If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
at ChildProcess.<anonymous> (/home/travis/build/Xuanwo/xuanwo.github.io/node_modules/hexo-deployer-git/node_modules/hexo-util/lib/spawn.js:42:17)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Socket.<anonymous> (child_process.js:979:11)
at Socket.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
The command "hexo d" exited with 1.
Done. Your build exited with 1.
I think we don't need to create a new dir, just add a new remote in git.
add this for every git address:
script:
- git push [email protected]:Xuanwo/xuanwo.github.io.git master:master --force
- git push [email protected]:xuanwo/xuanwo.git master:gitcafe-pages --force
addons:
ssh_known_hosts:
- github.com
- gitcafe.com
Well, I'm try to fix it by myself. But according to I have no experience in js, it may take some time, sorry for all.
As title, I setup my repo with ssh put it failed when I try to deploy at Github ....
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
at ChildProcess.<anonymous> (C:\cygwin64\home\user\Github\_hexo\hexo-tag-owl-demo\node_modules\hexo-util\lib\spawn.js:42:17)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:818:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:469:12)
And my config
hexo: 3.1.1
os: Windows_NT 10.0.10240 win32 x64
http_parser: 2.5.0
node: 4.2.1
v8: 4.5.103.35
uv: 1.7.5
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 56.1
modules: 46
openssl: 1.0.2d
for some reason, dual-git-deployment is very necessary.
I added a CNAME file under the root directory however it won't push to the remote repo; so I manually add a CNAME file at the remote repo. However, every time I run "hexo d -g"; the CNAME file will disappear.
执行deploy命令之后,原有未更新的旧版本文件都被删除了(比如readme.md文件)
每次更新,我并没有更新readme,但是我github仓库里的readme被删除了
可以保留旧版本文件么?
deploy:
type: git
message: [message]
repo:
github: <repository url>,[branch]
gitcafe: <repository url>,[branch]
我采用如上的方式去配置_config.yml
文件,目的就是想要同时推送到多个remote,悲剧的是,在推送时报错了。
报错信息跟这个很类似,不过我是在本地操作也是报错。
环境如下,
{ 'hexo-site': '0.0.0',
npm: '3.4.1',
ares: '1.10.1-DEV',
http_parser: '2.5.0',
icu: '56.1',
modules: '47',
node: '5.0.0',
openssl: '1.0.2d',
uv: '1.7.5',
v8: '4.6.85.28',
zlib: '1.2.8' }
'hexo-deployer-git': "^0.2.0"
on https://www.npmjs.com/package/hexo-deployer-git doesn't has "extends_dir"
in it config.
But in this repo, it has been merged(#39) at about six months ago.
I just want to ask when the version "0.3.0"
with extends_dir
is released?
Hello, I use hexo-deployer-git to send blogs to my VPS. Although my SSH config set port, hexo still use port 22 to connect my vps. Here is my config file:
Host 104.224.164.243
HostName 104.224.164.243
Port 28806
User git
IdentityFile ~/.ssh/id_rsa
When I use "ssh -t [email protected]" via Terminal, the config file worked. I use macOS Sierra.
Any way to fix this problem? Waiting for your relpy.
Thank you .
[email protected] /Users/jhp-android/Desktop/github/edagarli.github.io
├─┬ [email protected]
│ └─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
└─┬ [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ └── [email protected]
└─┬ [email protected]
├── [email protected]
└── [email protected]
justhacker:edagarli.github.io justhacker$ hexo deploy
ERROR Deployer not found: git
It will always overwrite the placed CNAME file on the repo
使用hexo -d 没有反应是怎么回事?
zjydeMacBook-Pro:Blog zjy$ hexo d
zjydeMacBook-Pro:Blog zjy$ ls -a
. .npmignore node_modules scaffolds
.. _config.yml package.json source
.gitignore db.json public themes
zjydeMacBook-Pro:Blog zjy$
.deploy_git 这个目录也没有生成?
README.md
Users can to clone the deployed repo to .deploy_git to keep the commit history.
Users can clone ...
I think pushing for deployment is a bit much, or at least it is in my case. I think it would be awesome to add an option where the user could configure it to say "deploy and commit to the branch locally, but don't push"
hexo works perfect with github. However, I've got two questions:
I have my website deployed at: https://github.com/LongerVision/longervision.github.io , which can be viewed at https://longervision.github.io/ . But, when I changed a laptop, how can I git clone the deployed website -- the current contents in https://github.com/LongerVision/longervision.github.io is NOT git pushed, but hexo deployed, they are different ...
Thank you
Pei
为了添加自定义域名,在repo根目录添加了 CNAME文件,但是每次部署之后就被删除,请问如何保留CNAME文件?
Hi,
In my local copy of my hexo site's GitHub repo I have changed my remote origin and upstream to the corresponding SSH versions (i.e., to [email protected]:fusion809/hexo-site.git), my SSH key has been added to my GitHub account and my SSH agent has been started (which I know for certain as whenever I try to commit to other repos that I have set to commit via SSH, everything goes without a hitch, without me having to provide my username and password), yet whenever I run hexo deploy --generate
I am forced to enter my GitHub username and password, like as if this plugin is ignoring my new remote. Is there something I've missed that I need to do in order to authenticate my deployments via SSH?
Here is the output of git remote -v
being run in my local copy of my hexo-site GitHub repo, in case you suspect I've messed up changing my remote:
origin [email protected]:fusion809/hexo-site.git (fetch)
origin [email protected]:fusion809/hexo-site.git (push)
upstream [email protected]:fusion809/hexo-site.git (fetch)
upstream [email protected]:fusion809/hexo-site.git (push)
Thanks for your time,
Brenton
INFO Deploying: git
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
TypeError: undefined is not a function
at Object.exports.parse (/Users/JoshPAT/Documents/my_blog/node_modules/hexo-deployer-git/node_modules/swig/lib/parser.js:438:19)
at parse (/Users/JoshPAT/Documents/my_blog/node_modules/hexo-deployer-git/node_modules/swig/lib/swig.js:354:19)
at Object.precompile (/Users/JoshPAT/Documents/my_blog/node_modules/hexo-deployer-git/node_modules/swig/lib/swig.js:486:23)
at Object.compile (/Users/JoshPAT/Documents/my_blog/node_modules/hexo-deployer-git/node_modules/swig/lib/swig.js:606:16)
at commitMessage (/Users/JoshPAT/Documents/my_blog/node_modules/hexo-deployer-git/lib/deployer.js:95:15)
at Hexo.module.exports (/Users/JoshPAT/Documents/my_blog/node_modules/hexo-deployer-git/lib/deployer.js:21:17)
at Hexo.tryCatcher (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/util.js:24:31)
at Hexo.<anonymous> (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/method.js:15:34)
at /Users/JoshPAT/Documents/my_blog/node_modules/hexo/lib/plugins/console/deploy.js:56:28
at tryCatcher (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/util.js:24:31)
at ReductionPromiseArray._promiseFulfilled (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/reduce.js:103:38)
at ReductionPromiseArray.init [as _init$] (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/promise_array.js:92:18)
at Promise._settlePromiseAt (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:528:21)
at Promise._settlePromises (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:646:14)
at Async._drainQueue (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:177:16)
at Async._drainQueues (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:187:10)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/JoshPAT/Documents/my_blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:15:14)
at processImmediate [as _immediateCallback] (timers.js:358:17)
btw, I am using Mac OS 10.9.5...
Hey there, loving Hexo so far, thanks for all of the hard work put into it.
I've got my github pages set up perfectly with my domain (patrickbollenbach.me) . All is well for the most part.
Except when I deploy to my "patrickbolle.github.io" repo using the hexo deploy command --
My pages domain goes down for a couple minutes.
I've got a CNAME file directing to patrickbollenbach.me so patrickbolle.github.io will always redirect to that domain.
Anybody have this problem?
it's not a major deal, but if i'm making small mods/new posts/ etc my site will keep crashing even for small periods of time.
Thanks!
大陆有很多免费的应用引擎可以用
但是都只是支持https形式的
能否增加https账号密码的参数 使用travis-ci.org 加密参数以后可以自动部署?
hexo d
have no output. No error message or warnings, and nothing happened, files are not deployed too.hexo clean
, there is error messages indicate the error. Once it is corrected, hexo d
can run normally. There could be other problems with git setup but at least there is error messages.Here is the disadvantage of force push
So suggest avoid force push when deploy to git repository.
如下
warning: 在 Git 2.0 版本,位于一个子目录下不带任何路径参数地执行命令
'git add --all (或 -A)' 的行为将被改变,不要再继续使用了。
如果要添加整个目录树的内容,执行:
git add --all :/
(或 git add -A :/)
如果要限制该命令只作用于当前目录,执行:
git add --all .
(或 git add -A .)
对于当前版本的 Git,这条命令只作用于当前目录。
My repo save origin source Hexo project file at Master
branch, and generated file at gh-pages
branch.
When I update to the separated hexo-deployer-git, and run hexo d
at my working directory at Master
branch, it always push .deploy_git
to origin master, not origin gh-pages.
表示看不到任何提示,没法确定问题
前提: ~/.gitconfig
文件中设置的全局参数
[user]
name = global_name
email = global_email
然后在_config.yml中设置
deploy:
- type: git
repo: github_repo
branch: [branch]
name: github_name
email: github_email
- type: git
repo: coding_repo
branch: [branch]
name: coding_name
email: coding_email
执行hexo deploy提交后,查看github和coding,commit的作者是 global_name global_email
my blog has a branch named 'master:1', when I wrote it follow in config.yaml:
deploy:
type: git
repo: https://git.sinacloud.com/netcanblog
branch: master:1
and I hexo -d
will go wrong:
error: src refspec HEAD:master does not match any.
error: failed to push some refs to 'https://git.sinacloud.com/netcanblog'
I think it should be a conflict because it has ':'
在执行hexo deploy时得到如下说明。
由于我有很多不同的git账号,所以一般情况下,我是不会匹配全局账号的。
但是hexo deploy时则会要求全局账号,这种情况可能会影响到不同源码库的提交。
所以建议使用当前库里的github账号。
即在hexo deploy执行的当前目录里寻找 .git/config里面的账号信息进行deploy.
而我的.git/config已经匹配了user的信息
*** Please tell me who you are.
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
Date is now the local machine time.
If travis is used, time will be the timezone of travis.
Can we use the config.timezone to set the date for commit msg, if the timezone is set in _config.yml?
I should how to write when having two deplyer,
deploy:
type: git
repo: xxx
branch: master
message: Site updated:{{ now('YYYY-MM-DD HH:mm:ss') }}
deploy:
type: othertype
when I write like this, I get a error, “duplicated mapping key ” .
I don't know how to do ,I will modify some one deployer or not ?
and I know this not git deployer wrong. but if we can do this better, why not ?
操作系统 mac ox 10.10.4
nodejs 版本 v0.12.7
hexo-deployer-git 版本 0.0.4
提示信息:
➜ blog hexo deploy
[info] Start deploying: git
[error] TypeError: Arguments to path.join must be strings
TypeError: Arguments to path.join must be strings
at Object.posix.join (path.js:488:13)
at Object.module.exports as git
at /usr/local/lib/node_modules/hexo/lib/plugins/console/deploy.js:76:22
at iterate (/usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:149:13)
at Object.async.eachSeries (/usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:165:9)
at /usr/local/lib/node_modules/hexo/lib/plugins/console/deploy.js:66:11
at /usr/local/lib/node_modules/hexo/lib/plugins/console/deploy.js:32:27
at FSReqWrap.cb as oncomplete
According to this code https://github.com/hexojs/hexo-deployer-git/blob/master/lib%2Fdeployer.js#L54
plugin try to fins exisiting deployDir and if not - create and Init new repo, then creates a "First commit".
When I make deployments from my dev machine - it is fine (repo is created once and then commits are added), but when I use "CircleCI" CI/CD service - it makes each build in clean Docker container, so deloyDir is always absent. That's why "gh-pages" branch always cleared and rewritten with 2 commits - "First commit" and "Repo is updated...".
I thought that is could be a way - to try to checkout exisiting repo/branch first and only if there is nothing - try to init new. What do you think ?
P.S. That's not a critical thing, but would look nicer and not confusing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.