File: /mnt/HC_Volume_102964888/html/tryaccelerate/.gitlab-ci.yml
stages:
- deploy_main
variables:
DEPLOY_PATH: "/mnt/HC_Volume_102964888/html/tryaccelerate"
CONFIG_SOURCE_PATH: "/mnt/HC_Volume_102964888/html/tryaccelerate_files/wp-config.php"
deploy_main:
stage: deploy_main
only:
- main
script:
- echo "Deploying WordPress to production server..."
- ssh $SSH_USER@$SSH_SERVER "
cd $DEPLOY_PATH &&
git fetch &&
git reset --hard origin/main &&
cp $CONFIG_SOURCE_PATH $DEPLOY_PATH/wp-config.php &&
find $DEPLOY_PATH -type f -exec chmod 664 {} \; &&
find $DEPLOY_PATH -type d -exec chmod 775 {} \; &&
echo 'Deployment complete, wp-config.php copied, and permissions set!'
"