diff --git a/resources/post-deploy.sh b/resources/post-deploy.sh new file mode 100644 index 0000000..0c9041f --- /dev/null +++ b/resources/post-deploy.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +# SCript to run after heliopropa source where updated. +# +# Should be execute within root directory of project +# +# May be run by the git post-receive hook + + + +source ./venv/bin/activate +pip install -r requirements.txt + +# may be more commands to run ... +# flask db upgrade +sudo systemctl restart heliopropa +sudo systemctl restart nginx diff --git a/resources/post-receive.git-hook b/resources/post-receive.git-hook index e161b79..2b91173 100644 --- a/resources/post-receive.git-hook +++ b/resources/post-receive.git-hook @@ -55,7 +55,7 @@ do git checkout ${BRANCH} # set branch if not done yet, sorry guy git pull ${REPOSITORY} ${BRANCH} # get latest modifications, assumes remote origin previously set exec git update-server-info - ##/bin/sh scripts/post-deploy.sh + /bin/sh ./post-deploy.sh # Alternately, it is possible to just update a git repo echo "DONE -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+" else -- libgit2 0.21.2