Skip to content

Instantly share code, notes, and snippets.

@mohamm6d
Created March 20, 2020 08:20
Show Gist options
  • Save mohamm6d/6220b9d5f9618665d7c5fb15242b20a0 to your computer and use it in GitHub Desktop.
Save mohamm6d/6220b9d5f9618665d7c5fb15242b20a0 to your computer and use it in GitHub Desktop.
Sample of post-receive for Git repository
#!/bin/sh
echo "Starting deploying ..."
git --work-tree=/var/www/example.com/public_html --git-dir=git-server/example-com.git checkout -f
echo "Starting composer ... please wait"
composer install --working-dir=/var/www/example.com/public_html
echo "Composer done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment