mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
start start.sh on githook
This commit is contained in:
parent
1d59fc7a4e
commit
59efb3fcf5
@ -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<void> => {
|
||||
@ -15,8 +18,9 @@ export const githubWebhook = async (req: any, res: any): Promise<void> => {
|
||||
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,
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user