Skip to content

Commit 34c6e56

Browse files
author
Greg Bowler
committed
feature: chown as separate step
1 parent 39ed48e commit 34c6e56

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Diff for: deploy-action.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ then
5454
-i "$ssh_key_path" \
5555
-p "$ACTION_PORT" \
5656
"$ACTION_USER"@"$ACTION_HOSTNAME" \
57-
"cd $deployed_dir && chown -R $ACTION_PATH_OWNER ."
57+
"cd $full_transfer_path && $ACTION_POST_TRANSFER_SCRIPT_PREFIX $ACTION_POST_TRANSFER_SCRIPT CHOWN"
5858
fi

Diff for: remote-post-transfer.bash

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ source_dir="$full_transfer_path"
33
destination_dir="$ACTION_PATH/$GITHUB_REF_NAME"
44
destination_dir_prev="$destination_dir.previous"
55

6+
if [ "$1" == "CHOWN" ]
7+
then
8+
echo "Changing owner to $ACTION_PATH_OWNER"
9+
chown -R "$ACTION_PATH_OWNER" "$destination_dir"
10+
echo "Done"
11+
exit
12+
fi
13+
614
echo "Started post-transfer script with source ($source_dir) destination ($destination_dir)"
715

816
if [[ ! -d "$ACTION_PATH" ]]
@@ -21,7 +29,6 @@ then
2129
fi
2230

2331
mv "$source_dir" "$destination_dir"
24-
#chown -R "$ACTION_PATH_OWNER" "$destination_dir"
2532

2633
echo "Completed post-transfer script"
2734

0 commit comments

Comments
 (0)