<commit_before>#!/bin/bash

# only proceed script when started not by pull request (PR)
if [ $TRAVIS_PULL_REQUEST == "true" ]; then
  echo "this is PR, exiting"
  exit 0
fi

# enable error reporting to the console
set -e

# build site with jekyll, by default to `_site' folder
bundle exec jekyll build

# cleanup
rm -rf gh-pages

git clone -b gh-pages https://${GH_TOKEN}@github.com/newtheatre/history-project.git gh-pages

# copy generated HTML site to built branch
cp -R _site/* gh-pages

# commit and push generated content to built branch
# since repository was cloned in write mode with token auth - we can push there
cd gh-pages
git config user.email "<EMAIL>"
git config user.name "NTHP Build Bot"
git add -A .
git commit -a -m "Travis #$TRAVIS_BUILD_NUMBER"
git push --quiet origin travis-build-test > /dev/null 2>&1 # Hiding all the output from git push command, to prevent token leak.
<commit_msg>wrong branch, doh<commit_after>#!/bin/bash

# only proceed script when started not by pull request (PR)
if [ $TRAVIS_PULL_REQUEST == "true" ]; then
  echo "this is PR, exiting"
  exit 0
fi

# enable error reporting to the console
set -e

# build site with jekyll, by default to `_site' folder
bundle exec jekyll build

# cleanup
rm -rf gh-pages

git clone -b gh-pages https://${GH_TOKEN}@github.com/newtheatre/history-project.git gh-pages

# copy generated HTML site to built branch
cp -R _site/* gh-pages

# commit and push generated content to built branch
# since repository was cloned in write mode with token auth - we can push there
cd gh-pages
git config user.email "<EMAIL>"
git config user.name "NTHP Build Bot"
git add -A .
git commit -a -m "Travis #$TRAVIS_BUILD_NUMBER"
git push --quiet origin gh-pages > /dev/null 2>&1 # Hiding all the output from git push command, to prevent token leak.

{'fraction_non_alphanumeric': 0.09065782200110559, 'fraction_numerical': 0.003316749585406302, 'mean_word_length': 3.8655913978494625, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '5122825', 'n_tokens_mistral': 596, 'n_tokens_neox': 571, 'n_words': 256}