add explicit example of action after pull
This commit is contained in:
parent
7eb3ef7ce4
commit
b5883c4866
1 changed files with 8 additions and 0 deletions
|
@ -59,6 +59,14 @@ app.post(`/${process.env.APP_PATH}`, (req, res) => {
|
|||
if ( `sha256=${hmac.digest('hex').toString()}` === req.get('X-Hub-Signature-256') ){
|
||||
if (req.body.ref === 'refs/heads/main') {
|
||||
gitPull(local_repo, res)
|
||||
// you could do something to process your files at this point:
|
||||
// .then( () => {
|
||||
// try {
|
||||
// //do something
|
||||
// } catch (err) {
|
||||
// console.error('Oh no! ', err)
|
||||
// }
|
||||
// })
|
||||
} else {
|
||||
console.log('Ignoring push to non-default branch')
|
||||
res.status(200).send('Ignoring push to non-default branch')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue