added git deployement
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "updating drupal 8"
|
||||
echo "Switching to project docroot."
|
||||
cd ./app
|
||||
echo ""
|
||||
echo "Pulling down latest code."
|
||||
git pull --ff-only origin prod
|
||||
echo ""
|
||||
echo "Clearing drush caches."
|
||||
drush cache-clear drush
|
||||
echo ""
|
||||
echo "Composer install."
|
||||
composer install --no-dev
|
||||
echo ""
|
||||
echo "Running database updates."
|
||||
drush updb -y
|
||||
echo ""
|
||||
echo "Importing configuration."
|
||||
drush config-import -y
|
||||
echo ""
|
||||
echo "Clearing caches."
|
||||
drush cr
|
||||
echo ""
|
||||
echo "Deployment complete."
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "updating"
|
||||
echo "Switching to project docroot."
|
||||
cd ./app
|
||||
echo ""
|
||||
echo "Pulling down latest code."
|
||||
git pull --ff-only origin prod
|
||||
echo ""
|
||||
echo "Deployment complete."
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
#hook/post-receive
|
||||
#CONFIG
|
||||
|
||||
PRODDIR="www"
|
||||
|
||||
read oldrev newrev refname
|
||||
if [ $refname = "refs/heads/prod" ]; then
|
||||
echo "===== DEPLOYING APP ====="
|
||||
unset GIT_DIR
|
||||
cd ~
|
||||
cd $PRODDIR
|
||||
# git pull --ff-only origin prod
|
||||
# run deploy script instead
|
||||
. deploy.sh
|
||||
echo $?
|
||||
echo "====== OK ====="
|
||||
else
|
||||
echo "Warning Commit not deployed, please use prod branch"
|
||||
fi
|
||||
Reference in New Issue
Block a user