version 3.0.0 API Docs (#4943)

* Adds documentation and docs generation upon merge

* nits
This commit is contained in:
Florent Vilmart
2018-08-09 16:20:13 -04:00
parent 457d51a972
commit 0571675fcd
10 changed files with 465 additions and 3 deletions

29
release_docs.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/sh -e
set -x
if [ "${TRAVIS_REPO_SLUG}" = "" ];
then
echo "Cannot release docs without TRAVIS_REPO_SLUG set"
exit 0;
fi
REPO="https://github.com/${TRAVIS_REPO_SLUG}"
rm -rf docs
git clone -b gh-pages --single-branch $REPO ./docs
cd docs
git pull origin gh-pages
cd ..
DEST="master"
if [ "${TRAVIS_TAG}" != "" ];
then
DEST="${TRAVIS_TAG}"
# change the default page to the latest
echo "<meta http-equiv='refresh' content='0; url=/parse-server/api/${DEST}'>" > "docs/api/index.html"
fi
npm run docs
rm -rf docs/api/*
mkdir -p "docs/api/${DEST}"
cp -R out/* "docs/api/${DEST}"