docs: Generate API documentation for release branch (#9081)
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
"template": "./node_modules/clean-jsdoc-theme",
|
"template": "./node_modules/clean-jsdoc-theme",
|
||||||
"theme_opts": {
|
"theme_opts": {
|
||||||
"default_theme": "dark",
|
"default_theme": "dark",
|
||||||
"title": "<img src='../.github/parse-server-logo.png' class='logo'/>",
|
"title": "<img src='https://raw.githubusercontent.com/parse-community/parse-server/alpha/.github/parse-server-logo.png' class='logo'/>",
|
||||||
"create_style": "header, .sidebar-section-title, .sidebar-title { color: #139cee !important } .logo { margin-left : 40px; margin-right: 40px }"
|
"create_style": "header, .sidebar-section-title, .sidebar-title { color: #139cee !important } .logo { margin-left : 40px; margin-right: 40px }"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
set -x
|
set -x
|
||||||
|
# GITHUB_ACTIONS=true SOURCE_TAG=test ./release_docs.sh
|
||||||
|
|
||||||
if [ "${GITHUB_ACTIONS}" = "" ];
|
if [ "${GITHUB_ACTIONS}" = "" ];
|
||||||
then
|
then
|
||||||
echo "Cannot release docs without GITHUB_ACTIONS set"
|
echo "Cannot release docs without GITHUB_ACTIONS set"
|
||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
|
if [ "${SOURCE_TAG}" = "" ];
|
||||||
|
then
|
||||||
|
echo "Cannot release docs without SOURCE_TAG set"
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
REPO="https://github.com/parse-community/parse-server"
|
REPO="https://github.com/parse-community/parse-server"
|
||||||
|
|
||||||
rm -rf docs
|
rm -rf docs
|
||||||
@@ -13,20 +20,20 @@ cd docs
|
|||||||
git pull origin gh-pages
|
git pull origin gh-pages
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
DEST="master"
|
RELEASE="release"
|
||||||
|
VERSION="${SOURCE_TAG}"
|
||||||
|
|
||||||
if [ "${SOURCE_TAG}" != "" ];
|
# change the default page to the latest
|
||||||
then
|
echo "<meta http-equiv='refresh' content='0; url=/parse-server/api/${VERSION}'>" > "docs/api/index.html"
|
||||||
DEST="${SOURCE_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 definitions
|
npm run definitions
|
||||||
npm run docs
|
npm run docs
|
||||||
|
|
||||||
mkdir -p "docs/api/${DEST}"
|
mkdir -p "docs/api/${RELEASE}"
|
||||||
cp -R out/* "docs/api/${DEST}"
|
cp -R out/* "docs/api/${RELEASE}"
|
||||||
|
|
||||||
|
mkdir -p "docs/api/${VERSION}"
|
||||||
|
cp -R out/* "docs/api/${VERSION}"
|
||||||
|
|
||||||
# Copy other resources
|
# Copy other resources
|
||||||
RESOURCE_DIR=".github"
|
RESOURCE_DIR=".github"
|
||||||
|
|||||||
Reference in New Issue
Block a user