@@ -11,26 +11,27 @@ if [ "$TRAVIS" ]; then #running under travis
11
11
if [ " $TRAVIS_BRANCH " = " master" ] && \
12
12
[ " $TRAVIS_PULL_REQUEST " = " false" ] && \
13
13
[ " $( ls -A " $TRAVIS_BUILD_DIR /doc" ) " ] ; then # not empty
14
- git clone -- branch=gh-pages " https://${GH_TOKEN} @github.com/$TRAVIS_REPO_SLUG " gh-pages
14
+ git clone -q -- branch=gh-pages " https://${GH_TOKEN} @github.com/$TRAVIS_REPO_SLUG " gh-pages > /dev/null 2>&1
15
15
cd gh-pages || exit 1
16
- rm -r css favicon.png fonts index.html interface js lists media module page proc \
17
- program search.html sourcefile src tipuesearch type
16
+ rm -rf -- css fonts interface lists module proc search.html src type favicon.png index.html \
17
+ js media page program sourcefile tipuesearch || true
18
18
cp -r " $TRAVIS_BUILD_DIR " /doc/* .
19
- git add -A # Add all the new files
20
- git commit -m " Development documentation updated by travis job $TRAVIS_JOB_NUMBER for commits $TRAVIS_COMMIT_RANGE "
21
- git push origin gh-pages
19
+ git add -A || true # Add all the new files
20
+ git commit -m " Development documentation updated by travis job $TRAVIS_JOB_NUMBER for commits $TRAVIS_COMMIT_RANGE " || true
21
+ git push -fq origin gh-pages > /dev/null 2>&1 || true
22
22
fi
23
23
# If publishing a new/updated tag, deploy it's documentation
24
24
if [ " $TRAVIS_TAG " ] && [ " $( ls -A " $TRAVIS_BUILD_DIR /doc" ) " ] ; then # not empty
25
25
cd " $TRAVIS_BUILD_DIR " || exit 1
26
- git clone --branch=gh-pages " https://${GH_TOKEN} @github.com/$TRAVIS_REPO_SLUG " gh-pages
27
- sed " 1 s/^/version: ${TRAVIS_TAG} \n/" json-fortran.md > json-fortran.tagged.md
26
+ git clone -q --branch=gh-pages " https://${GH_TOKEN} @github.com/$TRAVIS_REPO_SLUG " gh-pages > /dev/null 2>&1
27
+ sed " 2 s/^/version: ${TRAVIS_TAG} \n/" json-fortran.md > json-fortran.tagged.md
28
+ head json-fortran.tagged.md # Debug output
28
29
# rebuild FORD documentation without pages, with version info, wiping out any existing tag folder
29
- ford -o " gh-pages/$TRAVIS_TAG " json-fortran.tagged.md
30
+ ford --debug - o " gh-pages/$TRAVIS_TAG " json-fortran.tagged.md
30
31
cd gh-pages || exit 1
31
32
git add -A # add all new files in $TRAVIS_TAG/
32
33
git commit -m " Tag/release documentation updated by travis job $TRAVIS_JOB_NUMBER for tag $TRAVIS_TAG $TRAVIS_COMMIT "
33
- git push origin gh-pages
34
+ git push -f -q origin gh-pages > /dev/null 2>&1
34
35
fi
35
36
fi
36
37
fi
0 commit comments