Permalink
Browse files
MNT: Add sitemap.txt generation for gh-pages
- Loading branch information...
Showing
with
11 additions
and
0 deletions.
-
+11
−0
.github/deploy-gh-pages.sh
|
|
@@ -8,12 +8,23 @@ fi |
|
|
|
|
|
|
|
[ "$GH_PASSWORD" ] || exit 12 |
|
|
|
|
|
|
|
sitemap() { |
|
|
|
WEBSITE='https://kernc.github.io/backtesting.py' |
|
|
|
find -name '*.html' | |
|
|
|
sed "s,^\.,$WEBSITE," | |
|
|
|
sed 's/index.html$//' | |
|
|
|
grep -v '/google.*\.html$' | |
|
|
|
sort -u > 'sitemap.txt' |
|
|
|
echo "Sitemap: $WEBSITE/sitemap.txt" > 'robots.txt' |
|
|
|
} |
|
|
|
|
|
|
|
head=$(git rev-parse HEAD) |
|
|
|
|
|
|
|
git clone -b gh-pages "https://kernc:$GH_PASSWORD@github.com/$TRAVIS_REPO_SLUG.git" gh-pages |
|
|
|
mkdir -p gh-pages/doc |
|
|
|
cp -R doc/build/* gh-pages/doc/ |
|
|
|
cd gh-pages |
|
|
|
sitemap |
|
|
|
git add * |
|
|
|
git diff --staged --quiet && echo "$0: No changes to commit." && exit 0 |
|
|
|
git commit -a -m "CI: Update docs for $TRAVIS_TAG ($head)" |
|
|
|
0 comments on commit
8ab04ba