Skip to content

Instantly share code, notes, and snippets.

@suhailshergill
Created April 5, 2013 11:57
Show Gist options
  • Save suhailshergill/5318757 to your computer and use it in GitHub Desktop.
Save suhailshergill/5318757 to your computer and use it in GitHub Desktop.
provorg: blog deployment

prereqs

  • set remote host + auto-confirm
(setq su/provorg/host "chaos"
      org-confirm-babel-evaluate nil)
  • ensure that vagrant is up and running

local

git push
git rev-parse HEAD

vagrant

  • pull latest code. hmm checkout specific branches/commits? would need to pass arguments to code blocks
  • build it
  • compress using upx + copy them over to shared folder
bash -i - 1> /dev/null <<EOF
workon blog
git fetch --all && git reset --hard "$commit"
make deploy
EOF

local

scp files over to chaos

tar czf - . | ssh $host "cd $server_dir/.hsenv/bin; tar xzf -"
echo "pushed to $host!"

chaos

bash -i - <<EOF
workon blog 1> /dev/null
printenv VIRTUAL_ENV # for some reason echo doesn't work here
EOF
bash -i - <<EOF
workon blog 1> /dev/null
git fetch --all && git reset --hard "$commit"
make install # decompress + copy files
EOF

postreqs

(setq su/provorg/host "localhost"
      org-confirm-babel-evaluate t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment