File: /mnt/HC_Volume_102964888/html/reporev-backend/.gitlab-ci.yml
stages:
- deploy_development
variables:
DEPLOY_PATH: "/mnt/HC_Volume_102964888/html/reporev-backend"
FILES_PATH: "/mnt/HC_Volume_102964888/html/reporev-backend_files"
deploy_development:
stage: deploy_development
only:
- development
script:
- echo "Deploying Slim PHP application to development server..."
- ssh $SSH_USER@$SSH_SERVER "
cd $DEPLOY_PATH &&
git fetch &&
git reset --hard origin/development &&
cp -r $FILES_PATH/. . &&
chmod -R 775 . &&
chown -R $SSH_USER:www-data . &&
echo 'Deployment complete and files copied from \$FILES_PATH!' &&
echo 'Running database migrations...' &&
php migrations/migration.php &&
echo 'Migrations complete!'
"