diff --git a/.circleci/config.yml b/.circleci/config.yml index 268c84f070..254d135d4b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -94,8 +94,15 @@ jobs: command: | pages_branch="gh-pages-test" - git config --global user.email "circleci-" - git config --global user.name "CircleCI Bot" + SOURCE_COMMIT=$(git rev-parse HEAD) + SOURCE_REPO="${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" + + COMMIT_USER_NAME=$(git log -1 --pretty=format:'%an') + COMMIT_USER_EMAIL=$(git log -1 --pretty=format:'%ae') + + # Git operations with committer's identity + git config --global user.name "${COMMIT_USER_NAME}" + git config --global user.email "${COMMIT_USER_EMAIL}" # Create new orphan branch without parent history git checkout --orphan ${pages_branch}