Skip to content

Commit dc79f00

Browse files
authored
Merge pull request #15 from dynamsoft-docs/preview
Merge from Preview
2 parents 9ee3bce + 2f98eb5 commit dc79f00

File tree

104 files changed

+5265
-2407
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+5265
-2407
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
push:
99
branches:
1010
- main
11-
- preview
11+
#- preview
1212

1313
# Allows you to run this workflow manually from the Actions tab
1414
workflow_dispatch:
@@ -18,69 +18,17 @@ jobs:
1818
# This workflow contains jobs called "Build-Main" and "Build-Preview"
1919
Build-Main:
2020
if: ${{ github.ref == 'refs/heads/main' }}
21-
# The type of runner that the job will run on
22-
runs-on: self-hosted
21+
uses: dynamsoft-docs/Docs-Template-Repo/.github/workflows/called-workflow-build-sync-production.yml@main
22+
with:
23+
doc-repo: capture-vision-docs-js
24+
doc-url: capture-vision/docs/web
25+
secrets: inherit
2326

24-
# Steps represent a sequence of tasks that will be executed as part of the job
25-
steps:
26-
# Runs a set of commands using the runners shell
27-
- name: Build the site - Main
28-
run: |
29-
cd /home/ubuntu
30-
[ -d DCVDocJS ] && rm -rf DCVDocJS
31-
[ -d capture-vision-docs-js ] && rm -rf capture-vision-docs-js
32-
[ -d Docs-Template-Repo-Preview ] && rm -rf Docs-Template-Repo-Preview
33-
[ ! -d DCVDocJS ] && mkdir -p DCVDocJS
34-
git clone --depth 1 https://github.com/dynamsoft-docs/capture-vision-docs-js.git capture-vision-docs-js
35-
git clone --depth 1 --branch preview https://github.com/dynamsoft-docs/Docs-Template-Repo.git Docs-Template-Repo-Preview
36-
cp -rfp ./capture-vision-docs-js/* ./DCVDocJS/
37-
cp -rfp ./Docs-Template-Repo-Preview/* ./DCVDocJS/
38-
cd DCVDocJS && bundle install && bundle exec jekyll build
39-
40-
- name: Sync files
41-
uses: SamKirkland/[email protected]
42-
with:
43-
server: ${{ secrets.FTP_DYNAMSOFT_LOCAL_SERVER }}
44-
username: ${{ secrets.FTP_DYNAMSOFT_LOCAL_USER }}
45-
password: ${{ secrets.FTP_DYNAMSOFT_LOCAL_PASSWORD }}
46-
port: 21
47-
local-dir: /home/ubuntu/DCVDocJS/_site/
48-
server-dir: /www.dynamsoft.com/capture-vision/docs/web/
49-
50-
- name: Trigger Webhook
51-
run: |
52-
curl -X POST -H "${{ secrets.WEBHOOK_USER }}" -H "${{ secrets.WEBHOOK_TOKEN }}" -H "Content-Type: application/json" -d "[\"/capture-vision/docs/web/*\"]" ${{ secrets.WEBHOOK_URL }}
53-
54-
5527
Build-Preview:
5628
if: ${{ github.ref == 'refs/heads/preview' }}
57-
# The type of runner that the job will run on
58-
runs-on: self-hosted
59-
60-
# Steps represent a sequence of tasks that will be executed as part of the job
61-
steps:
62-
# Runs a set of commands using the runners shell
63-
- name: Build the site - Preview
64-
run: |
65-
cd /home/ubuntu
66-
[ -d DCVDocJS-preview ] && rm -rf DCVDocJS-preview
67-
[ -d capture-vision-docs-js-preview ] && rm -rf capture-vision-docs-js-preview
68-
[ -d Docs-Template-Repo-Preview ] && rm -rf Docs-Template-Repo-Preview
69-
[ ! -d DCVDocJS-preview ] && mkdir -p DCVDocJS-preview
70-
git clone --depth 1 --branch preview https://${{ secrets.GIT_USER }}:${{ secrets.GIT_PAT }}@github.com/dynamsoft-docs/capture-vision-docs-js.git capture-vision-docs-js-preview
71-
git clone --depth 1 --branch preview https://github.com/dynamsoft-docs/Docs-Template-Repo.git Docs-Template-Repo-Preview
72-
cp -rfp ./capture-vision-docs-js-preview/* ./DCVDocJS-preview/
73-
cp -rfp ./Docs-Template-Repo-Preview/* ./DCVDocJS-preview/
74-
sed -i -e "1,3s/blob\/master$/blob\/preview/" \
75-
-e "1,3s/blob\/main$/blob\/preview/" /home/ubuntu/DCVDocJS-preview/_config.yml
76-
cd DCVDocJS-preview && bundle install && bundle exec jekyll build
29+
uses: dynamsoft-docs/Docs-Template-Repo/.github/workflows/called-workflow-build-sync-testing.yml@preview
30+
with:
31+
doc-repo: capture-vision-docs-js
32+
doc-url: capture-vision/docs/web
33+
secrets: inherit
7734

78-
- name: Sync files
79-
uses: SamKirkland/[email protected]
80-
with:
81-
server: ${{ secrets.FTP_TEST_SITE_SERVER }}
82-
username: ${{ secrets.FTP_TEST_SITE_USER }}
83-
password: ${{ secrets.FTP_TEST_SITE_PASSWORD }}
84-
port: 7500
85-
local-dir: /home/ubuntu/DCVDocJS-preview/_site/
86-
server-dir: /www.dynamsoft.com/capture-vision/docs/web/

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
.DS_Store
3+
/.vs

_config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ repositoryUrl: https://github.com/dynamsoft-docs/capture-vision-docs-js/blob/mai
22
repository: dynamsoft-docs/capture-vision-docs-js
33
docFullPath: https://www.dynamsoft.com/capture-vision/docs/web/
44
firstLevelUrl: /capture-vision/docs/web/
5+
docRootName: "Dynamsoft Capture Vision JS Edition"
56
docHomePage: /capture-vision/docs/core/introduction/
67

78
introduction: /capture-vision/docs/core/introduction/
@@ -12,7 +13,10 @@ parameterReference: /capture-vision/docs/core/parameters/reference/
1213
enums: /capture-vision/docs/core/enums/
1314

1415
js: /capture-vision/docs/web/programming/javascript/
15-
js_api: /capture-vision/docs/web/programming/javascript/api-reference/
16+
dcv_js_api: /capture-vision/docs/web/programming/javascript/api-reference/
17+
dbr_js_api: /barcode-reader/docs/web/programming/javascript/api-reference/
18+
dlr_js_api: /label-recognition/docs/web/programming/javascript/api-reference/
19+
ddn_js_api: /document-normalizer/docs/web/programming/javascript/api-reference/
1620

1721
assets: /capture-vision/docs/web/assets/
1822
edit_icon: /capture-vision/docs/web/assets/img-icon/edit-icon.png

_data/product_version.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1+
useGroupedVersion: true
2+
13
version_info_list:
2-
- latest version
4+
- value: latest version
5+
- value: 2.x
6+
child:
7+
- 2.0.30(latest)
8+
- 2.0.20
9+
- 2.0.10

_includes/sidelist-full-tree.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<li>
2-
<a style="cursor:pointer;color:#3c3c3c" href="{{ site.js }}index.html">JS Edition Introduction</a>
2+
<a style="cursor:pointer;color:#3c3c3c" href="{{ site.js }}index.html">Introduction</a>
33
</li>
44
{%- include liquid_searchVersionTreeFile.html ver=include.ver curPath=include.curPath targetRelativePath="sidelist-programming/programming-js.html" -%}

0 commit comments

Comments
 (0)