2019-12-02 02:35:58 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2019-12-22 23:17:27 +01:00
|
|
|
set -x # No fail, we need to go back to the original branch at the end
|
2019-12-22 22:22:33 +01:00
|
|
|
|
|
|
|
|
# Build documentation only from Linux x86_64 builds
|
2019-12-27 01:48:48 +01:00
|
|
|
if [[ ${TRAVIS_CPU_ARCH} != "amd64" || ${TRAVIS_OS_NAME} != "linux" ]]; then
|
2019-12-23 14:42:35 +01:00
|
|
|
exit 0
|
|
|
|
|
fi
|
2019-12-02 02:35:58 +01:00
|
|
|
|
|
|
|
|
doxygen Doxyfile
|
|
|
|
|
git fetch --depth=1 https://github.com/${TRAVIS_REPO_SLUG}.git refs/heads/gh-pages:refs/remotes/origin/gh-pages
|
|
|
|
|
git checkout origin/gh-pages
|
|
|
|
|
git checkout -b gh-pages
|
|
|
|
|
rm -rf ./api
|
|
|
|
|
mv _api api
|
|
|
|
|
git add api && git commit -m "Travis build: ${TRAVIS_BUILD_NUMBER}"
|
|
|
|
|
git remote add origin-pages https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git > /dev/null 2>&1
|
|
|
|
|
git push --quiet --set-upstream origin-pages gh-pages
|
2019-12-22 23:17:27 +01:00
|
|
|
git checkout ${TRAVIS_BRANCH}
|