Last active
June 13, 2023 21:26
-
-
Save IgorDePaula/7ac6c481bfdfc83d22d0940faa94ff27 to your computer and use it in GitHub Desktop.
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 | |
TARGET="/var/www/" | |
GIT_DIR="/home/git/laravel.git" | |
BRANCH="master" | |
GREEN='\033[0;32m' # green, in true | |
NC='\033[0m' # No Color | |
BLUE='\033[0;34m' | |
while read oldrev newrev ref | |
do | |
# only checking out the master (or whatever branch you would like to deploy) | |
if [ "$ref" = "refs/heads/$BRANCH" ] | |
then | |
printf "${GREEN}############################################################${NC}\n" | |
printf "${GREEN}## ##${NC}\n" | |
printf "${GREEN}## Iniciando deploy - BlankBlackCloud ##${NC}\n" | |
printf "${GREEN}## ##${NC}\n" | |
printf "${GREEN}############################################################${NC}\n" | |
git --work-tree=$TARGET --git-dir=$GIT_DIR checkout -f $BRANCH | |
printf "${GREEN}############################################################${NC}\n" | |
printf "${GREEN}## ##${NC}\n" | |
printf "${GREEN}## Deploy realizado - BlankBlackCloud ##${NC}\n" | |
printf "${GREEN}## ##${NC}\n" | |
printf "${GREEN}############################################################${NC}\n" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment