-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What is admin.deployCommand? #70
Comments
I've found the like with deployCommand here: https://github.com/jaredly/hexo-admin/blob/8312967c7f707418dbb6ae5116e03292862d9dc4/api.js use('deploy', function(req, res, next) {
if (req.method !== 'POST') return next()
if (!hexo.config.admin || !hexo.config.admin.deployCommand) {
return res.done({error: 'Config value "admin.deployCommand" not found'});
}
try {
deploy(hexo.config.admin.deployCommand, req.body.message, function(err, result) {
console.log('res', err, result);
if (err) {
return res.done({error: err.message || err})
}
res.done(result);
});
} catch (e) {
console.log('EEE', e);
res.done({error: e.message})
}
}); I tried to fill the |
create deploy-script in project dir: with such 2 lines for example or any custom code: #!/usr/bin/env sh
hexo deploy and edit _config.yml: admin:
deployCommand: './hexo-deploy.sh' |
This appears sufficiently answered thanks to @vladpurga. The deploy command is any command you'd like run on the terminal. Placing many commands in a bash script or batch file is a great way to do it. Be aware that Windows does not use hashbangs (telling how to execute the file with the first line of a file, the |
What is admin.deployCommand?
The text was updated successfully, but these errors were encountered: