forked from icopy-site/awesome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
24 lines (19 loc) · 783 Bytes
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
# Push HTML files to gh-pages automatically.
# Fill this out with the correct org/repo
ORG=icopy-site
REPO=awesome
# This probably should match an email for one of your users.
set -e
git remote add gh-token "https://${GH_TOKEN}@github.com/$ORG/$REPO.git";
git fetch gh-token && git fetch gh-token gh-pages:gh-pages;
# Update git configuration so I can push.
if [ "$1" != "dry" ]; then
# Update git config.
git config user.name "Travis Builder"
git config user.email "$EMAIL"
fi
pythonVersion=`python -V 2>&1|awk '{print $2}'`
cp search_index.py /home/travis/virtualenv/python${pythonVersion}/lib/python3.6/site-packages/mkdocs/contrib/search/search_index.py
mkdocs gh-deploy -v --clean --force --remote-name gh-token;