<commit_before>#!/usr/bin/env sh
# Pushes documentation to the gh pages

set -e # Stop on error
set -v

echo "Travis PR flag: $TRAVIS_PULL_REQUEST"
echo "Travis branch: $TRAVIS_BRANCH"
echo "Travis commit: $TRAVIS_COMMIT"
echo "Travis build number: $TRAVIS_BUILD_NUMBER"


if [ "${TRAVIS_PULL_REQUEST}" != "false" -o "${TRAVIS_BRANCH}" != "develop" ]; then
    echo "Skipping doc deploy. Only develop branch should be deployed"
    exit 0
fi

BRANCH_NAME="travis-${TRAVIS_BUILD_NUMBER}-${TRAVIS_COMMIT}"

cd build
mkdir -p gh_pages
cd gh_pages
git clone https://${GH_TOKEN}@github.com/forGGe/forGGe.github.io.git .

git config --local user.email "<EMAIL>"
git config --local user.name "<NAME>"

# Delete all pages before adding new. Handles case when page should be deleted.
rm -rv ../gh_pages/theCore/*
cp -rv ../docs/sphinx/* .

if [ -z "$(git status --porcelain)" ]; then
    echo "No documentation changes present. Skipping doc deploy"
    exit 0
fi

git checkout -b ${BRANCH_NAME}
git add .
git commit -m 'Travis update from ${TRAVIS_BUILD_NUMBER}'
git push --quiet origin ${BRANCH_NAME}<commit_msg>>277 Correct bash variable expansion for docs deploy<commit_after>#!/usr/bin/env sh
# Pushes documentation to the gh pages

set -e # Stop on error
set -v

echo "Travis PR flag: $TRAVIS_PULL_REQUEST"
echo "Travis branch: $TRAVIS_BRANCH"
echo "Travis commit: $TRAVIS_COMMIT"
echo "Travis build number: $TRAVIS_BUILD_NUMBER"


if [ "${TRAVIS_PULL_REQUEST}" != "false" -o "${TRAVIS_BRANCH}" != "develop" ]; then
    echo "Skipping doc deploy. Only develop branch should be deployed"
    exit 0
fi

BRANCH_NAME="travis-${TRAVIS_BUILD_NUMBER}-${TRAVIS_COMMIT}"

cd build
mkdir -p gh_pages
cd gh_pages
git clone https://${GH_TOKEN}@github.com/forGGe/forGGe.github.io.git .

git config --local user.email "<EMAIL>"
git config --local user.name "<NAME>"

# Delete all pages before adding new. Handles case when page should be deleted.
rm -rv ../gh_pages/theCore/*
cp -rv ../docs/sphinx/* .

if [ -z "$(git status --porcelain)" ]; then
    echo "No documentation changes present. Skipping doc deploy"
    exit 0
fi

git checkout -b ${BRANCH_NAME}
git add .
git commit -m "Travis update from ${TRAVIS_BUILD_NUMBER}"
git push --quiet origin ${BRANCH_NAME}
{'fraction_non_alphanumeric': 0.12594570538495772, 'fraction_numerical': 0.003115264797507788, 'mean_word_length': 4.155963302752293, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '76848', 'n_tokens_mistral': 815, 'n_tokens_neox': 796, 'n_words': 262}