add explicit example of action after pull

This commit is contained in:
Hugh Rundle 2025-04-19 11:38:52 +10:00
parent 7eb3ef7ce4
commit b5883c4866
Signed by: hugh
GPG key ID: A7E35779918253F9

View file

@ -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')