<commit_before>#!/bin/bash

# Only deploy if not PR
if [[ $TRAVIS_PULL_REQUEST = "false" ]]
  then
  # cleanup
  rm -rf gh-pages

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

  # Clear out all files, but not dotfiles
  rm -rf 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 "ntbot"
  git add -A .
  git commit -a -m "Travis Build $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.
fi<commit_msg>Do not clone remote gh-pages repo, force push instead<commit_after>#!/bin/bash

# Only deploy if not PR
if [[ $TRAVIS_PULL_REQUEST = "false" ]]
  then
  cd _site

  git init
  git checkout -b gh-pages
  git remote add origin https://${GH_TOKEN}@github.com/newtheatre/history-project-gh-pages.git

  # commit and push generated content to built branch
  # since remote was added with token auth - we can push there
  git config user.email "<EMAIL>"
  git config user.name "ntbot"
  git add -A .
  git commit -a -m "Travis Build $TRAVIS_BUILD_NUMBER"
  git push --quiet -f origin gh-pages > /dev/null 2>&1 # Hiding all the output from git push command, to prevent token leak.
fi
{'fraction_non_alphanumeric': 0.09618008185538882, 'fraction_numerical': 0.002728512960436562, 'mean_word_length': 3.289473684210526, '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': '7098465', 'n_tokens_mistral': 499, 'n_tokens_neox': 474, 'n_words': 191}