1
0
forked from Mirror/wren

Testing fix to doc deploy script.

This commit is contained in:
Bob Nystrom
2018-07-14 10:35:45 -07:00
parent 08b5492362
commit 5fff693530
2 changed files with 25 additions and 18 deletions

View File

@ -1,27 +1,34 @@
#!/bin/bash
set -e
# Install the Wren Pygments lexer.
cd util/pygments-lexer
python setup.py develop
cd ../..
# Build the docs.
make gh-pages
# TODO: This strips the syntax highlighting because the custom pygments lexer
# isn't installed.
git clone https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG} gh-pages-repo
# Clone the repo at the gh-pages branch.
# TODO: Testing right now, so not using live branch.
git clone https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG} gh-pages-repo \
--branch gh-pages-temp --depth 1
cd gh-pages-repo
git checkout gh-pages
# Copy them into the gh-pages branch.
rm -rf *
cp -r ../build/gh-pages/* .
# TODO: Restore CNAME file that gets deleted by `rm -rf *`.
# Restore CNAME file that gets deleted by `rm -rf *`.
echo "wren.io" > "CNAME"
git status
ls
if ! $( git diff-index --quiet HEAD ) ; then
git config user.name "Travis CI"
git config user.email "$COMMIT_AUTHOR_EMAIL"
git add --all .
git commit -m "Deploy to GitHub Pages: ${SHA}"
git push
git config user.name "Travis CI"
git config user.email "$COMMIT_AUTHOR_EMAIL"
git add --all .
git commit -m "Deploy to GitHub Pages: ${SHA}"
git push
fi