Skip to content
Permalink
Browse files

MNT: Add sitemap.txt generation for gh-pages

  • Loading branch information...
kernc committed Jan 11, 2019
1 parent 74f0f9b commit 8ab04bacc8d512d80971160bafc9e7b824a776c6
Showing with 11 additions and 0 deletions.
  1. +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

Please sign in to comment.
You can’t perform that action at this time.