-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
[MRG+1] CI gratuitous optimisation of doc pushing #7887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fi | ||
cd $DOC_REPO | ||
git config core.sparseCheckout true | ||
echo $dir > .git/info/sparse-checkout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am really surprised that this should be done manually. It seems very error prone.
Are you sure that this is the right way to do a sparse checkout?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I did it this way when the only resource to ask was man
. But now that I look, it does indeed seem to be the standard way to do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After all, why put a command interface to a newline-delimited plain text file?
LGTM |
A fancier way to make scikit-learn.github.io light is to not store any documentation in the master branch, and instead store each version in another branch, linked in via git submodules. This transition can be achieved with: git submodule init
git checkout master
git checkout -b cheap-clone master
dirs="0.15 0.16 0.17 0.18 0.19 dev"
git rm $dirs
for v in $dirs
do
# Copy each directory into its own branch
git checkout cheap-clone
git branch -d -D version-$v
git checkout --orphan version-$v
git rm -rf * .nojekyll
git checkout master $v
git mv $v/{*,.[a-z]*} .
git commit -am "Version $v"
git push origin version-$v:version-$v
git checkout -f cheap-clone
git submodule add https://github.com/scikit-learn/scikit-learn.github.io/ $v
cd $v
git checkout version-$v
cd ..
git commit -am "Add version $v as submodule"
done
git push origin cheap-clone:master Such a change is almost entirely gratuitous. |
This is completely unnecessary, but in cloning scikit-learn.github.io, I realised how much faster that can be done with a couple of flags to git.