Skip to content

Instantly share code, notes, and snippets.

@herestomwiththeweather
Created June 5, 2016 23:18
Show Gist options
  • Save herestomwiththeweather/c1ec89cb22f6d97feed963b4b32309e3 to your computer and use it in GitHub Desktop.
Save herestomwiththeweather/c1ec89cb22f6d97feed963b4b32309e3 to your computer and use it in GitHub Desktop.
post-receive
from, to, branch = ARGF.read.split " "
if (branch =~ /herestomwiththeweather$/) == nil
puts "Received branch #{branch}, not deploying."
exit
end
deploy_to_dir = '/home/pants/deploy/herestomwiththeweather-jekyll-indieweb'
`unset GIT_DIR && cd "#{deploy_to_dir}" && git pull`
puts "DEPLOY: herestomwiththeweather(#{to}) copied to '#{deploy_to_dir}'"
`cd /home/pants/repositories/herestomwiththeweather-jekyll-indieweb.git/hooks && ./send_webmentions.rb`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment