Skip to content

Commit bceb621

Browse files
authored
docs: Generate API documentation for release branch (#9081)
1 parent 2532acf commit bceb621

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

jsdoc-conf.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"template": "./node_modules/clean-jsdoc-theme",
3030
"theme_opts": {
3131
"default_theme": "dark",
32-
"title": "<img src='../.github/parse-server-logo.png' class='logo'/>",
32+
"title": "<img src='https://raw.githubusercontent.com/parse-community/parse-server/alpha/.github/parse-server-logo.png' class='logo'/>",
3333
"create_style": "header, .sidebar-section-title, .sidebar-title { color: #139cee !important } .logo { margin-left : 40px; margin-right: 40px }"
3434
}
3535
},

release_docs.sh

+16-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
#!/bin/sh -e
22
set -x
3+
# GITHUB_ACTIONS=true SOURCE_TAG=test ./release_docs.sh
4+
35
if [ "${GITHUB_ACTIONS}" = "" ];
46
then
57
echo "Cannot release docs without GITHUB_ACTIONS set"
68
exit 0;
79
fi
10+
if [ "${SOURCE_TAG}" = "" ];
11+
then
12+
echo "Cannot release docs without SOURCE_TAG set"
13+
exit 0;
14+
fi
815
REPO="https://github.com/parse-community/parse-server"
916

1017
rm -rf docs
@@ -13,20 +20,20 @@ cd docs
1320
git pull origin gh-pages
1421
cd ..
1522

16-
DEST="master"
23+
RELEASE="release"
24+
VERSION="${SOURCE_TAG}"
1725

18-
if [ "${SOURCE_TAG}" != "" ];
19-
then
20-
DEST="${SOURCE_TAG}"
21-
# change the default page to the latest
22-
echo "<meta http-equiv='refresh' content='0; url=/parse-server/api/${DEST}'>" > "docs/api/index.html"
23-
fi
26+
# change the default page to the latest
27+
echo "<meta http-equiv='refresh' content='0; url=/parse-server/api/${VERSION}'>" > "docs/api/index.html"
2428

2529
npm run definitions
2630
npm run docs
2731

28-
mkdir -p "docs/api/${DEST}"
29-
cp -R out/* "docs/api/${DEST}"
32+
mkdir -p "docs/api/${RELEASE}"
33+
cp -R out/* "docs/api/${RELEASE}"
34+
35+
mkdir -p "docs/api/${VERSION}"
36+
cp -R out/* "docs/api/${VERSION}"
3037

3138
# Copy other resources
3239
RESOURCE_DIR=".github"

0 commit comments

Comments
 (0)