<commit_before>#!/bin/sh

if [ ! -f .jazzy.yaml ]; then
    echo "error: - Could not find .jazzy.yaml. in $(pwd)" >&2
    exit 1
fi

if [ -z $GITHUB_TOKEN ]; then
    echo "error: - Could not find GitHub token." >&2
    exit 1
fi

git clone -b gh-pages https://github.com/aquarchitect/MyKit.git docs

echo ">>> Generating documentation sets ..."
jazzy

echo ">>> Minifying web files ..."
for file in $(find docs \( -name "*.html" -or -name "*.css" \)); do
    case ${file##*.} in
		html) cat $file | html-minifier --collapse-whitespace -o $file;;
		css) cat $file | cleancss --s0 -o $file;;
	esac
done

echo ">>> Commiting generated documentation ..."
git add .
git commit -m "Travis update on $(date +%D)"
git remote add upstream https://$GITHUB_TOKEN@github.com/aquarchitect/MyKit.git
git push upstream gh-pages
<commit_msg>Secure github url<commit_after>#!/bin/sh

if [ ! -f .jazzy.yaml ]; then
    echo "error: - Could not find .jazzy.yaml. in $(pwd)" >&2
    exit 1
fi

if [ -z $GITHUB_TOKEN ]; then
    echo "error: - Could not find GitHub token." >&2
    exit 1
fi

git clone -b gh-pages https://github.com/aquarchitect/MyKit.git docs

echo ">>> Generating documentation sets ..."
jazzy

echo ">>> Minifying web files ..."
for file in $(find docs \( -name "*.html" -or -name "*.css" \)); do
    case ${file##*.} in
		html) cat $file | html-minifier --collapse-whitespace -o $file;;
		css) cat $file | cleancss --s0 -o $file;;
	esac
done

echo ">>> Commiting generated documentation ..."
GITHUB_URL=https://$GITHUB_TOKEN@github.com/aquarchitect/MyKit.git
git add .
git commit -m "Travis update on $(date +%D)"
git remote add upstream $GITHUB_URL > /dev/null 2>&1
git push upstream gh-pages

{'fraction_non_alphanumeric': 0.1645047169811321, 'fraction_numerical': 0.007075471698113208, 'mean_word_length': 3.089156626506024, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 27, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6782014', 'n_tokens_mistral': 635, 'n_tokens_neox': 608, 'n_words': 205}