Skip to content

Commit 556b758

Browse files
committed
refactor: Incorporate JSDoc into the deploy job
1 parent 9c8e455 commit 556b758

2 files changed

Lines changed: 75 additions & 6 deletions

File tree

.github/workflows/deploy-vitepress-docs.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,18 @@ jobs:
5454
- name: generate CLI doc
5555
working-directory: packages/documentation
5656
run: npm run generate-cli-doc
57-
- name: Build jsdoc
58-
working-directory: packages/documentation
59-
run: npm run jsdoc-generate
6057
- name: Build vitepress build
6158
working-directory: packages/documentation
6259
run: |
63-
cd packages/documentation
6460
# The base output
6561
npm run build:vitepress -- --base="/${{ github.event.repository.name }}/${DOC_VERSION}/"
6662
npm run build:assets -- ./dist
6763
# The alias output
6864
npm run build:vitepress -- --base="/${{ github.event.repository.name }}/${DOC_ALIAS}/" --outDir="dist-${DOC_ALIAS}"
6965
npm run build:assets -- ./dist-${DOC_ALIAS}
66+
- name: Build jsdoc
67+
working-directory: packages/documentation
68+
run: npm run jsdoc-generate
7069
# TODO: Skip for now deployment of the schema until we do a Schema Version 5 release
7170
# - name: Build Schema
7271
# run: |
@@ -87,15 +86,14 @@ jobs:
8786
8887
# Main version route
8988
cp -R ./packages/documentation/dist ./gh-pages/${DOC_VERSION}/
90-
cp -R ./site/api ./gh-pages/${DOC_VERSION}/api
9189
9290
# Alias route. E.g., next, latest, stable, etc.
9391
# For vitepress must be a copy with different config, not a symlink
9492
cp -R ./packages/documentation/dist-${DOC_ALIAS} ./gh-pages/${DOC_ALIAS}/
9593
# Symlink the api docs to avoid duplication
9694
ln -s ../${DOC_VERSION}/api ./gh-pages/${DOC_ALIAS}/api
9795
98-
cp ./scripts/resources/custom404.html ./gh-pages/404.html
96+
cp ./packages/documentation/scripts/resources/custom404.html ./gh-pages/404.html
9997
- name: Publish Docs
10098
run: |
10199
cd ./gh-pages
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"tags": {
3+
"allowUnknownTags": false
4+
},
5+
"source": {
6+
"include": ["jsdoc/index.md"],
7+
"exclude": [
8+
"node_modules/@ui5/builder/lib/lbt/utils/JSTokenizer.js",
9+
"node_modules/@ui5/builder/lib/processors/jsdoc/lib/ui5/plugin.js",
10+
"node_modules/@ui5/builder/lib/processors/jsdoc/lib/ui5/template/publish.js",
11+
"node_modules/@ui5/builder/lib/processors/jsdoc/lib/ui5/template/utils/versionUtil.js"
12+
],
13+
"includePattern": "node_modules/@ui5/[^\/]*/(lib/.+|index)\\.js$",
14+
"excludePattern": "node_modules/@ui5/.*/node_modules/@ui5"
15+
},
16+
"plugins": [
17+
"jsdoc/jsdoc-plugin.cjs"
18+
],
19+
"opts": {
20+
"encoding": "utf8",
21+
"destination": "dist/api/",
22+
"recurse": true,
23+
"verbose": true,
24+
"access": "public"
25+
},
26+
"templates": {
27+
"cleverLinks": false,
28+
"monospaceLinks": false,
29+
"default": {
30+
"useLongnameInNav": true,
31+
"layoutFile": "jsdoc/templates/layout.tmpl",
32+
"staticFiles": {
33+
"include": ["jsdoc/templates/custom.css"]
34+
}
35+
}
36+
},
37+
"openGraph": {
38+
"title": "UI5 CLI - API Reference",
39+
"type": "website",
40+
"image": "https://ui5.github.io/cli/v4/images/UI5_logo_wide.png",
41+
"site_name": "UI5 CLI - API Reference",
42+
"url": "https://ui5.github.io/cli/v4/"
43+
},
44+
"docdash": {
45+
"sectionOrder": [
46+
"Modules",
47+
"Namespaces",
48+
"Classes",
49+
"Externals",
50+
"Events",
51+
"Mixins",
52+
"Tutorials",
53+
"Interfaces"
54+
],
55+
"meta": {
56+
"title": "UI5 CLI - API Reference",
57+
"description": "UI5 CLI - API Reference",
58+
"keyword": "openui5 sapui5 ui5 build development tool api reference"
59+
},
60+
"search": true,
61+
"wrap": true,
62+
"menu": {
63+
"GitHub": {
64+
"href": "https://github.com/UI5/cli",
65+
"target": "_blank",
66+
"class": "menu-item",
67+
"id": "github_link"
68+
}
69+
}
70+
}
71+
}

0 commit comments

Comments
 (0)