Skip to content

Instantly share code, notes, and snippets.

@mitsuhiko
Last active February 14, 2023 13:31
Show Gist options
  • Save mitsuhiko/94ce11f8372a5e8d1206 to your computer and use it in GitHub Desktop.
Save mitsuhiko/94ce11f8372a5e8d1206 to your computer and use it in GitHub Desktop.
location /webhook/17cbb307-94ec-446b-a17b-ab82594c974c {
if ($request_method != 'POST') {
return 405;
}
content_by_lua 'ngx.print(io.popen("/path/to/script.sh"):read("*a"))';
}
#!/bin/sh
ssh -i /path/to/id_rsa -o "StrictHostKeyChecking no" $@
#!/bin/sh
cd /path/to/repository
export GIT_SSH=/path/to/gitssh.sh
git pull
@judy2k
Copy link

judy2k commented Jun 21, 2014

Love it! :shipit:

@mjhea0
Copy link

mjhea0 commented Jun 22, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment