Skip to content

Commit

Permalink
Merge pull request #60 from giovannicuriel/push-force-ghp
Browse files Browse the repository at this point in the history
Pushing force to gh-pages
  • Loading branch information
giovannicuriel committed Apr 4, 2018
2 parents b4fb7bc + 3d46ade commit 4380262
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions travis/deploy-gh-pages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ git remote add -t gh-pages -f origin-gh-pages https://github.com/${TRAVIS_REPO_S
git fetch origin-gh-pages
git checkout gh-pages
git checkout ${TRAVIS_BRANCH} -- ./docs
mv docs/* .
rm -fr ./_static
mv docs/* . -f
git rm -r docs

if [ "${TRAVIS_BRANCH}" == "master" ]
Expand All @@ -14,8 +15,8 @@ fi
node_modules/.bin/aglio -i apiary.apib -o apiary_${VERSION}.html

git add apiary_${VERSION}.html
git commit -m 'Updating gh-pages'
git push http://${GITHUB_TOKEN}:x-oauth-basic@github.com/${TRAVIS_REPO_SLUG} gh-pages
git commit -m 'Updating gh-pages' --amend
git push --force http://${GITHUB_TOKEN}:x-oauth-basic@github.com/${TRAVIS_REPO_SLUG} gh-pages
git checkout -- .
git clean -fd
git checkout ${TRAVIS_BRANCH}
git checkout ${TRAVIS_BRANCH}

0 comments on commit 4380262

Please sign in to comment.