<commit_before>#!/bin/sh

set -ex

git clone --branch gh-pages https://github.com/openfisca/openfisca.org.git
mv build/html doc
rm --recursive --force openfisca.org/doc
mv doc openfisca.org/doc
cd openfisca.org
git fetch  # Make sure we are up to date with git remote branches
git add --all
git config --global user.name "OpenFisca-Bot"
git config --global user.email "<EMAIL>"
git diff-index --quiet HEAD || git commit --message="Push from openfisca doc"
git push https://github.com/openfisca/openfisca.org.git gh-pages
if git status --untracked-files=no ; then
	echo "There was an issue pushing to openfisca.org"
fi
# the following line removes all files in the branch exept the doc file.
rm --recursive --force $(git ls-files | grep --invert-match doc)
# the following lines keep the context while changing branch.
git checkout --detach
git reset --soft origin/doc-html
git checkout doc-html
git add --all
git diff-index --quiet HEAD || git commit --message="Push from openfisca doc"
git push<commit_msg>Skip CI when publishing doc<commit_after>#!/bin/sh

set -ex

git clone --branch gh-pages https://github.com/openfisca/openfisca.org.git
mv build/html doc
rm --recursive --force openfisca.org/doc
mv doc openfisca.org/doc
cd openfisca.org
git fetch  # Make sure we are up to date with git remote branches
git add --all
git config --global user.name "OpenFisca-Bot"
git config --global user.email "<EMAIL>"
git diff-index --quiet HEAD || git commit --message="[skip ci] Push from openfisca doc"
git push https://github.com/openfisca/openfisca.org.git gh-pages
if git status --untracked-files=no ; then
	echo "There was an issue pushing to openfisca.org"
fi
# the following line removes all files in the branch exept the doc file.
rm --recursive --force $(git ls-files | grep --invert-match doc)
# the following lines keep the context while changing branch.
git checkout --detach
git reset --soft origin/doc-html
git checkout doc-html
git add --all
git diff-index --quiet HEAD || git commit --message="[skip ci] Push from openfisca doc"
git push
{'fraction_non_alphanumeric': 0.1064453125, 'fraction_numerical': 0.0, 'mean_word_length': 3.7321016166281753, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4455418', 'n_tokens_mistral': 680, 'n_tokens_neox': 646, 'n_words': 265}