This file contains hidden or 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/bash | |
while read oldrev newrev ref | |
do | |
if [[ $ref =~ .*/master$ ]]; # Only check for master | |
then | |
echo "Master ref received. Deploying master branch to production..." | |
git --work-tree=/home/thelma/jp2_online --git-dir=/home/thelma/jp2_online/.git checkout -f # Where is the project folder and where is the git repo initialized | |
. /home/thelma/.env/jp2_production/bin/activate # Activate virtual environment | |
pip install -r /home/thelma/jp2_online/requirements/production.txt # Install requirements | |
npm install --production # Install node requirements |