From e0985d422fa62c22f40a7c3f867683ae04ca1fa4 Mon Sep 17 00:00:00 2001 From: Charlie Garrison Date: Sun, 29 Sep 2024 16:27:24 +1000 Subject: [PATCH] Use full path with sudo --- .github/workflows/deploy.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3a6e19c..0fe97b9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -84,16 +84,16 @@ jobs: ssh $USER@$HOST << EOF # Move files from temporary directory to final location - echo rsync -avz --delete $TEMP_DEPLOY_PATH/ $DEPLOY_PATH/ - sudo rsync -avz --delete $TEMP_DEPLOY_PATH/ $DEPLOY_PATH/ + echo /usr/bin/rsync -avz --delete $TEMP_DEPLOY_PATH/ $DEPLOY_PATH/ + sudo /usr/bin/rsync -avz --delete $TEMP_DEPLOY_PATH/ $DEPLOY_PATH/ # Set correct ownership and permissions - echo chown -R www-data:www-data $DEPLOY_PATH/ - sudo chown -R www-data:www-data $DEPLOY_PATH/ - echo find $DEPLOY_PATH/ -type d -exec chmod 755 {} \; - sudo find $DEPLOY_PATH/ -type d -exec chmod 755 {} \; - echo find $DEPLOY_PATH/ -type f -exec chmod 644 {} \; - sudo find $DEPLOY_PATH/ -type f -exec chmod 644 {} \; + echo /bin/chown -R www-data:www-data $DEPLOY_PATH/ + sudo /bin/chown -R www-data:www-data $DEPLOY_PATH/ + echo /usr/bin/find $DEPLOY_PATH/ -type d -exec /bin/chmod 755 {} \; + sudo /usr/bin/find $DEPLOY_PATH/ -type d -exec /bin/chmod 755 {} \; + echo /usr/bin/find $DEPLOY_PATH/ -type f -exec /bin/chmod 644 {} \; + sudo /usr/bin/find $DEPLOY_PATH/ -type f -exec /bin/chmod 644 {} \; # Clean up temporary directory rm -rf $TEMP_DEPLOY_PATH