@@ -85,6 +85,8 @@ function deploy(action) {
85
85
const branchExists = action . isTest & constants_1 . TestFlag . HAS_REMOTE_BRANCH ||
86
86
Boolean ( ( yield ( 0 , execute_1 . execute ) ( `git ls-remote --heads ${ action . repositoryPath } refs/heads/${ action . branch } ` , action . workspace , action . silent ) ) . stdout ) ;
87
87
yield ( 0 , worktree_1 . generateWorktree ) ( action , temporaryDeploymentDirectory , branchExists ) ;
88
+ /* Relaxes permissions of folder due to be deployed so rsync can write to/from it. */
89
+ yield ( 0 , execute_1 . execute ) ( `chmod -R +rw ${ action . folderPath } ` , action . workspace , action . silent ) ;
88
90
// Ensures that items that need to be excluded from the clean job get parsed.
89
91
let excludes = '' ;
90
92
if ( action . clean && action . cleanExclude ) {
@@ -189,7 +191,7 @@ function deploy(action) {
189
191
// Cleans up temporary files/folders and restores the git state.
190
192
( 0 , core_1 . info ) ( 'Running post deployment cleanup jobs… 🗑️' ) ;
191
193
yield ( 0 , execute_1 . execute ) ( `git checkout -B ${ temporaryDeploymentBranch } ` , `${ action . workspace } /${ temporaryDeploymentDirectory } ` , action . silent ) ;
192
- yield ( 0 , execute_1 . execute ) ( `chmod -R 777 ${ temporaryDeploymentDirectory } ` , action . workspace , action . silent ) ;
194
+ yield ( 0 , execute_1 . execute ) ( `chmod -R +rw ${ temporaryDeploymentDirectory } ` , action . workspace , action . silent ) ;
193
195
yield ( 0 , execute_1 . execute ) ( `git worktree remove ${ temporaryDeploymentDirectory } --force` , action . workspace , action . silent ) ;
194
196
yield ( 0 , io_1 . rmRF ) ( temporaryDeploymentDirectory ) ;
195
197
}
0 commit comments