#!/bin/bash
REMOTE_USER="ubuntu"
REMOTE_HOST="ec2-18-130-182-202.eu-west-2.compute.amazonaws.com"
REMOTE_DIR="/var/www/hris"
SSH_PRIVATE_KEY="$SSH_PRIVATE_KEY"
# Deploy the application to the EC2 instance
cd "/var/www/hris"
export GIT_SSH_COMMAND="ssh -i /var/www/hris/payraty-dev-key.pem -o IdentitiesOnly=yes"
# Pull latest changes from the repository
git pull origin develop
# Install Composer dependencies
composer install --no-interaction
php artisan migrate --force
