diff --git a/backend/src/webhook/github.ts b/backend/src/webhook/github.ts index 5a88f5f21..514e39e50 100644 --- a/backend/src/webhook/github.ts +++ b/backend/src/webhook/github.ts @@ -1,3 +1,6 @@ +// eslint-disable-next-line camelcase +import child_process from 'child_process' +import path from 'path' import CONFIG from '../config' export const githubWebhook = async (req: any, res: any): Promise => { @@ -15,8 +18,9 @@ export const githubWebhook = async (req: any, res: any): Promise => { console.log(payload) if (payload.ref === `refs/heads/${CONFIG.WEBHOOK_GITHUB_BRANCH}`) { - // eslint-disable-next-line no-console - console.log('MATCH!') + child_process.execFile(path.join(__dirname, '../../../deployment/bare_metal/start.sh'), [ + CONFIG.WEBHOOK_GITHUB_BRANCH, + ]) } } }