-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild_and_deploy.sh
executable file
·58 lines (37 loc) · 1.67 KB
/
build_and_deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
set -e # Exit with nonzero exit code if anything fails
# Then we build and deploy the sphinx / doxygen documentation
SOURCE_BRANCH="master"
#TARGET_BRANCH="gh-pages"
# Pull requests and commits to other branches shouldn't try to deploy
if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]; then
echo "Skipping deploy."
exit 0
fi
# Save some useful information
#REPO=`git config remote.origin.url`
#SSH_REPO=${REPO/https:\/\/github.com\//[email protected]:}
#SHA=`git rev-parse --verify HEAD`
# Change working directory to /docs
cd docs # ..................................... now we're in /docs
############################# DOXYGEN ########################################
cd doxygen # ..................................... now we're in /docs/doxygen
# create temporary clone of MFiX-Exa SOURCE_BRANCH
git clone https://gitlab-ci-token:[email protected]/gitlab/exa/mfix.git
# build the Doxygen documentation
doxygen doxygen.conf
cd .. # ..................................... now we're in /docs
# move it to the deploy directory: /docs/build
mkdir build
mv doxygen/html build/doxygen
############################# SPHINX ########################################
# now do sphinx
make html
cd build # ..................................... now we're in /docs/build
mv html docs_html
############################# WEB SERVER STUFF ################################
# Sphinx is set up to treat build/html (and by mv, build/docs_html) as the
# webroot. Hence the .nojekyll file is in the wrong place
mv docs_html/.nojekyll .
# PWD is currently /docs/build, we want to move /docs/webroot into /docs/build
mv ../webroot/* .