Skip to content

rocka/neoblog-plugin-github-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Webhook Plugin for Neoblog

Reload server when receive GitHub webhook.

What does this plugin actually do

  1. sync the repo and install dependencies
git fetch --all
git git reset --hard origin/master
npm ci
  1. 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.

About

NeoBlog plugin to reload server when receive GitHub webhook.

Resources

Stars

Watchers

Forks

Packages

No packages published