Skip to content

Instantly share code, notes, and snippets.

@oodavid
oodavid / README.md
Last active June 12, 2024 00:28 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
#!/bin/bash
#
# https://gist.github.com/oodavid/40fa04325f2b762dfb9e
#
# 1 - Copy this file to your home directory
# 2 - Add the following line to ~/.bash_logout
# /bin/bash ~/seeyouspacecowboy.sh; sleep 1
# 3 - Add the following to ~/bashrc
# trap_exit() {
# . "$HOME/.bash_logout"