version 3.0.0 API Docs (#4943)
* Adds documentation and docs generation upon merge * nits
This commit is contained in:
29
release_docs.sh
Executable file
29
release_docs.sh
Executable 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}"
|
||||
Reference in New Issue
Block a user