1.0.0 • Published 8 years ago
@neoblog/plugin-github-webhook v1.0.0
GitHub Webhook Plugin for Neoblog
Reload server when receive GitHub webhook.
What does this plugin actually does
- sync the repo and install dependencies
git fetch --all
git git reset --hard origin/master
npm ci- reload the server
neoblog.reload();Configuration
in NeoBlog config.js:
const GitHubWebhookPlugin = require('@neoblog/plugin-github-webhook');
module.exports = {
// ...
plugins: [
// ...
new GitHubWebhookPlugin({
secret: 'a-very-long-secret-that-should-be-generated',
path: '/path/to/webhook',
localRef: 'origin/master'
})
// ...
]
// ...
};then setup webhook in GitHub porject settings.
1.0.0
8 years ago