2018-07-23 10:19:52 +02:00
|
|
|
cd docs
|
2019-02-02 12:10:56 +01:00
|
|
|
yarn -v
|
2018-12-02 08:23:43 +01:00
|
|
|
node -v
|
2018-07-23 10:19:52 +02:00
|
|
|
echo 'Installing Gitbook CLI'
|
2019-03-04 12:51:53 +01:00
|
|
|
yarn global add gitbook-cli
|
2018-07-23 10:19:52 +02:00
|
|
|
|
|
|
|
|
echo 'Running Gitbook installation'
|
2019-03-04 12:51:53 +01:00
|
|
|
|
|
|
|
|
# Generate all version's GitBook output
|
|
|
|
|
for D in *; do
|
|
|
|
|
if [ -d "${D}" ]; then
|
|
|
|
|
echo "Generating output for: ${D}"
|
|
|
|
|
cd "${D}"
|
|
|
|
|
|
|
|
|
|
# Clear previous output, generate new
|
|
|
|
|
rm -rf _book
|
|
|
|
|
gitbook install
|
|
|
|
|
gitbook build
|
|
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Move CNAME File into `latest`
|
2019-04-17 20:04:31 +02:00
|
|
|
cp CNAME ./latest/_book/CNAME
|
2019-03-04 12:51:53 +01:00
|
|
|
|
|
|
|
|
# Create a history folder in our latest version's output
|
|
|
|
|
mkdir ./latest/_book/history
|
|
|
|
|
|
|
|
|
|
# Move each version's files to latest's history folder
|
|
|
|
|
for D in *; do
|
|
|
|
|
if [ -d "${D}" ]; then
|
|
|
|
|
if [[ "${D}" == v* ]] ; then
|
|
|
|
|
echo "Moving ${D} to the latest version's history folder"
|
|
|
|
|
|
|
|
|
|
mkdir "./latest/_book/history/${D}"
|
|
|
|
|
mv -v "./${D}/_book"/* "./latest/_book/history/${D}"
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
done
|
2018-07-23 10:19:52 +02:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
|
|
# Build and copy the StandaloneViewer into the static directory
|
2019-04-17 21:43:04 +02:00
|
|
|
echo $DEPLOY_PRIME_URL
|
|
|
|
|
export ROOT_URL=$DEPLOY_PRIME_URL/demo
|
2019-04-17 20:34:49 +02:00
|
|
|
|
2019-04-29 13:03:54 +02:00
|
|
|
mkdir ./docs/latest/_book/demo/
|
2019-04-28 21:25:53 +02:00
|
|
|
yarn install
|
2019-04-29 13:03:54 +02:00
|
|
|
yarn build:web:ci
|