<commit_before>#!/bin/bash
#Whenever Travis CI runs on our repository
# we have the opportunity to have it update the documentation and push that to gh-pages
#used as reference: http://awestruct.org/auto-deploy-to-github-pages/

set -e #exit script if any of the commands error

doc_branch="gh-pages"
repo=`git config remote.origin.url | sed "s/^git:/https:/"`

git remote set-url --push origin $repo
git remote set-branches --add origin $doc_branch
git fetch -q
git config user.name $GIT_NAME
git config user.email $GIT_EMAIL
git config credential.helper "store --file=.git/credentials"
echo "https://$GH_TOKEN:@github.com" >> .git/credentials
git branch $doc_branch origin/$doc_branch
touch travis-test.txt
git add travis-test.txt
git commit -m"test Travis-CI push"
git push origin $doc_branch
rm .git/credentials<commit_msg>Try a new approach<commit_after>#!/bin/bash
#Whenever Travis CI runs on our repository
# we have the opportunity to have it update the documentation and push that to gh-pages
#used as reference: https://evansosenko.com/posts/automatic-publishing-github-pages-travis-ci/
#used as reference: http://awestruct.org/auto-deploy-to-github-pages/

set -e #exit script if any of the commands error

deploy_branch="gh-pages"
repo=`git config remote.origin.url | sed "s/^git:/https:/"`
deploy_url=`echo $repo | sed "s|https://|https://$GH_TOKEN@|"`

#checkout the deploy branch in a temporary directory
pushd `mktemp -d`
git clone --branch $deploy_branch $repo .
git config user.name $GIT_NAME
git config user.email $GIT_EMAIL
#make changes:
touch travis-test.txt
git add travis-test.txt
git commit -m"test Travis-CI push"
git push -q $deploy_url $deploy_branch
popd
{'fraction_non_alphanumeric': 0.11289364230540701, 'fraction_numerical': 0.0, 'mean_word_length': 4.6891891891891895, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '5056396', 'n_tokens_mistral': 567, 'n_tokens_neox': 536, 'n_words': 189}