forked from OlehKulykov/OKAlertController
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate_docs.sh
executable file
·23 lines (16 loc) · 968 Bytes
/
generate_docs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
echo -e "Executing docs"
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
echo -e "Generating Jazzy output \n"
jazzy --clean --module-version 1.0.6 --author "Oleh Kulykov" --author_url http://www.resident.name --github_url https://github.com/OlehKulykov/OKAlertController --xcodebuild-arguments "-scheme,OKAlertController" --module OKAlertController --root-url http://olehkulykov.github.io/OKAlertController --theme apple --swift-version 2.2 --min-acl public --readme README.md
pushd docs
echo -e "Creating gh-pages\n"
git init
git config user.email ${GIT_EMAIL}
git config user.name ${GIT_NAME}
git add -A
git commit -m "Documentation from Travis build of $TRAVIS_COMMIT"
git push --quiet --force "https://${GH_TOKEN}@github.com/OlehKulykov/OKAlertController.git" master:gh-pages > /dev/null 2>&1
echo -e "Published documentation to gh-pages.\n"
popd
fi