Skip to content

Commit 2162a0a

Browse files
committed
Only deploy master branch
1 parent 7d289b6 commit 2162a0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

buildspec-4-sftpdeploy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ phases:
7979
# Deployment to the SFTP server
8080
- |
8181
set -e
82+
cat /codebuild/output/tmp/script.sh
8283
8384
# Determine what git branch we're on, we only want to deploy master
8485
export CODEBUILD_GIT_BRANCH=`git symbolic-ref HEAD --short 2>/dev/null`
@@ -103,7 +104,7 @@ phases:
103104
chmod 600 ~/.ssh/*
104105
105106
# Upload Files
106-
rsync -arvce "ssh -o StrictHostKeyChecking=no -p ${SFTP_PORT}" . ${SSH_USERNAME}@${SSH_SERVER}:~/public_html/
107+
rsync -arvce --delete-after "ssh -o StrictHostKeyChecking=no -p ${SFTP_PORT}" . ${SSH_USERNAME}@${SSH_SERVER}:~/public_html/
107108
108109
# Run any necessary remote commands
109110
ssh -o "StrictHostKeyChecking=no" ${SSH_USERNAME}@${SSH_SERVER} -p ${SSH_PORT} 'cd public_html ; composer install --optimize-autoloader; php artisan migrate'

0 commit comments

Comments
 (0)