This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# The production directory | |
TARGET="/var/www/{domain}/html/{project}/" # trailing slash matters | |
# A temporary directory for deployment | |
TEMP="/var/www/{domain}/tmp/{project}/" # trailing slash matters | |
# The Git repo | |
REPO="/var/www/{domain}/git/{project}.git" | |
# Deploy the content to the temporary directory | |
mkdir -p $TEMP | |
git --work-tree=$TEMP --git-dir=$REPO checkout -f |