File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 - bundle exec danger
99 script :
1010 - bundle exec rake ci:build[$VERSION]
11- - make carthage
11+ - make -B carthage
12+ - make -B docs
1213 after_script :
13- - make documentation
14+ - sh scripts/update-docs.sh
1415cache :
1516 bundler : true
1617 directories :
Original file line number Diff line number Diff line change @@ -18,5 +18,7 @@ setup: brew-install
1818carthage :
1919 set -o pipefail && carthage build --no-skip-current --verbose | xcpretty
2020
21- documentation :
21+ docs :
22+ rm -rfv docs
23+ git clone -b gh-pages --single-branch https://github.com/polydice/ICInputAccessory.git docs
2224 bundle exec jazzy --config .jazzy.yml
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ files=(html css js json)
4+
5+ for file in " ${files[@]} "
6+ do
7+ echo " Cleaning whitespace in *.$file ..."
8+ find docs/output -name " *." $file -exec sed -E -i ' ' -e ' s/[[:blank:]]*$//' {} \;
9+ done
10+
11+
12+ cd docs && pwd
13+ git checkout gh-pages
14+ git status
15+ cp -rfv output/* .
16+ git --no-pager diff --stat
17+ git add .
18+ git commit -m " [CI] Update documentation at $( date +' %Y-%m-%d %H:%M:%S %z' ) "
19+
20+ if [ " ${TRAVIS_BRANCH} " = " feature/auto-generated-docs" ]; then
21+ echo " Updating gh-pages..."
22+ git remote add upstream " https://${DANGER_GITHUB_API_TOKEN} @github.com/polydice/ICInputAccessory.git"
23+ git push --quiet upstream HEAD:gh-pages
24+ git remote remove upstream
25+ else
26+ echo " Skip gh-pages updates on ${TRAVIS_BRANCH} "
27+ fi
28+
29+ cd -
You can’t perform that action at this time.
0 commit comments