Skip to content

Commit

Permalink
Merge pull request #8 from Kumplex-Media-Holdings-Group-LLC/derricka8…
Browse files Browse the repository at this point in the history
…3-patch-5

Update .cpanel.yaml
  • Loading branch information
derricka83 authored Dec 4, 2024
2 parents dce5674 + 232dbc1 commit 737a88d
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions .cpanel.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
# Deployment Configuration for cPanel

deployment:
tasks:
- export DEPLOYPATH=/home/derricka/kmhgllc-kme
# Load environment variables
- source .env

# Display the deployment path
- echo "Starting deployment to $DEPLOYPATH"
- /bin/cp -R . $DEPLOYPATH
- echo "Deployment completed"

# Create backup directory if it doesn't exist
- if [ ! -d "$BACKUPDIR" ]; then mkdir -p $BACKUPDIR; fi
- echo "Backup directory verified: $BACKUPDIR"

# Backup current deployment
- rsync -av --delete $DEPLOYPATH/ $BACKUPDIR/
- echo "Backup completed: $BACKUPDIR"

# Deploy updated files to the target path
- rsync -av --exclude-from='.gitignore' ./ $DEPLOYPATH/
- echo "Deployment files synced to $DEPLOYPATH"

# Set correct permissions for the deployment path
- chmod -R 755 $DEPLOYPATH
- echo "Permissions set for deployment path"

# Log the deployment process
- echo "$(date '+%Y-%m-%d %H:%M:%S') Deployment to $DEPLOYPATH completed successfully." >> $LOGFILE

# Optional: Restart application or services if needed
- if [ -f "$DEPLOYPATH/restart.sh" ]; then bash $DEPLOYPATH/restart.sh; fi
- echo "Deployment completed!"completed successfully"

0 comments on commit 737a88d

Please sign in to comment.