Set up a bare git repository with the post-receive hook to auto checkout the project into the deployment/production directory.
GPL-3.0 License
This script sets up a bare git repository with the post-receive hook to auto checkout the project into the deployment/production directory.
Usage: gitdeploy.sh --git <example.git> --deploy <deploy_here> {--user | --host | --parent-directory | --branch}
Required:
-g, --git Bare Git Repository
-d, --deploy Deploy Location/Directory
Optional:
-u, --user SSH User (Default is current user)
-a, --host Host IP/Domain (Default is public IP)
-p, --parent-directory Specify Parent Directory (Default is currnet directory)
-b, --branch Specify Deploy Branch (Default is master)
-h, --help Displays Help Information
sudo mv gitdeploy.sh /usr/bin/gitdeploy
Use anywhere with gitdeploy
sudo rm /usr/bin/gitdeploy