[MRG+1] CI gratuitous optimisation of doc pushing#7887
[MRG+1] CI gratuitous optimisation of doc pushing#7887amueller merged 1 commit intoscikit-learn:masterfrom
Conversation
| fi | ||
| cd $DOC_REPO | ||
| git config core.sparseCheckout true | ||
| echo $dir > .git/info/sparse-checkout |
There was a problem hiding this comment.
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.
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.
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:masterSuch 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.