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