Skip to content

Instantly share code, notes, and snippets.

@fcofdez
Forked from mitsuhiko/example.conf
Created June 23, 2014 07:34
Show Gist options
  • Save fcofdez/7731f06dc6ba4c2f9d82 to your computer and use it in GitHub Desktop.
Save fcofdez/7731f06dc6ba4c2f9d82 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment