Updated the doc deployment to set the git user and email for LINQS Deploy.
# Build and deploy the API docs for PSL.
# The docs are only deployed for tag pushes.
-THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-REPO_ROOT_DIR="${THIS_DIR}/.."
-DOCS_DIR="${REPO_ROOT_DIR}/target/site/apidocs"
-TEMP_DIR='/tmp/psl-docs-deploy'
+readonly THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+readonly REPO_ROOT_DIR="${THIS_DIR}/.."
+readonly DOCS_DIR="${REPO_ROOT_DIR}/target/site/apidocs"
+readonly TEMP_DIR='/tmp/psl-docs-deploy'
-WEBSITE_REPO_URL="https://linqs-deploy:${LINQS_DEPLOY_TOKEN}@github.com/linqs/psl-website.git"
+readonly WEBSITE_REPO_URL="https://linqs-deploy:${LINQS_DEPLOY_TOKEN}@github.com/linqs/psl-website.git"
-REF_VERSION_TAG_REGEX='^refs/tags/(CANARY-)?[0-9]+\.[0-9]+\.[0-9]+$'
-API_DIR='api'
+readonly REF_VERSION_TAG_REGEX='^refs/tags/(CANARY-)?[0-9]+\.[0-9]+\.[0-9]+$'
+readonly API_DIR='api'
+
+readonly GIT_USER_EMAIL='linqs.deploy@gmail.com'
+readonly GIT_USER_NAME='LINQS Deploy'
function buildDocs() {
echo "Building docs."
@@ -41,7 +44,7 @@ function deployDocs() {
_scripts/update-versions.py
git add .
- git commit -m "Added autogenerated api docs from CI (${tag})."
+ git -c user.email="${GIT_USER_EMAIL}" -c user.name="${GIT_USER_NAME}" commit -m "Added autogenerated api docs from CI (${tag})."
git push
popd > /dev/null
}
