Skip to content

Staging #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/called-workflow-build-sync-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@ jobs:
server: ${{ secrets.FTP_DYNAMSOFT_LOCAL_SERVER }}
username: ${{ secrets.FTP_DYNAMSOFT_LOCAL_USER }}
password: ${{ secrets.FTP_DYNAMSOFT_LOCAL_PASSWORD }}
port: 21
port: 21
local-dir: ${{ runner.temp }}/DocHome/_site/
server-dir: /www.dynamsoft.com/${{ inputs.doc-url }}/
server-dir: /www.dynamsoft.com/${{ inputs.doc-url }}/

- name: Trigger Webhook
run: |
- name: Trigger Webhook
run: |
curl -X POST -H "${{ secrets.WEBHOOK_USER }}" -H "${{ secrets.WEBHOOK_TOKEN }}" -H "Content-Type: application/json" -d "[\"/${{ inputs.doc-url }}/*\"]" ${{ secrets.WEBHOOK_URL }}

- name: Update Sitemap
if: startsWith(inputs.doc-url, 'barcode-reader') ||
startsWith(inputs.doc-url, 'capture-vision') ||
startsWith(inputs.doc-url, 'label-recognition') ||
startsWith(inputs.doc-url, 'document-normalizer') ||
startsWith(inputs.doc-url, 'code-parser') ||
- name: Update Sitemap
if: startsWith(inputs.doc-url, 'barcode-reader') ||
startsWith(inputs.doc-url, 'capture-vision') ||
startsWith(inputs.doc-url, 'label-recognition') ||
startsWith(inputs.doc-url, 'document-normalizer') ||
startsWith(inputs.doc-url, 'code-parser') ||
startsWith(inputs.doc-url, 'camera-enhancer')
run: |
cd ${{ runner.temp }}/DocHome/assets/scripts/GenerateSitemap
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/called-workflow-build-sync-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

Build-Site-Preview:
# The type of runner that the job will run on
runs-on: [self-hosted, doc-build]
Expand All @@ -33,11 +32,11 @@ jobs:
-e "1,3s/blob\/main$/blob\/preview/" ${{ runner.temp }}/DocHome/_config.yml
cd DocHome && bundle install && bundle exec jekyll build

- name: 'Create Tar files'
- name: "Create Tar files"
run: tar -czvf ${{ inputs.doc-repo }}.tar.gz -C ${{ runner.temp }}/DocHome/_site .

- name: Upload the built site as a single artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.6.2
with:
name: ${{ inputs.doc-repo }}
path: ${{ inputs.doc-repo }}.tar.gz
Expand All @@ -52,23 +51,23 @@ jobs:
steps:
# Runs a set of commands using the runners shell
- name: Download the artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v4.3.0
with:
name: ${{ inputs.doc-repo }}

- name: 'Extract Tar files'
- name: "Extract Tar files"
shell: cmd
run: |
mkdir ${{ runner.temp }}\DocHome\_site
tar -xzf ${{ inputs.doc-repo }}.tar.gz -C ${{ runner.temp }}\DocHome\_site

- name: Sync files
uses: SamKirkland/FTP-Deploy-Action@4.3.0
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
with:
server: ${{ secrets.FTP_TEST_SITE_SERVER }}
username: ${{ secrets.FTP_TEST_SITE_USER }}
password: ${{ secrets.FTP_TEST_SITE_PASSWORD }}
port: ${{ secrets.FTP_TEST_SITE_PORT }}
protocol: ftps
port: ${{ secrets.FTP_TEST_SITE_PORT }}
local-dir: ${{ runner.temp }}\DocHome\_site/
server-dir: /www.dynamsoft.com/${{ inputs.doc-url }}/

server-dir: /www.dynamsoft.com/${{ inputs.doc-url }}/
17 changes: 13 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,25 @@ name: CI
on:
# Triggers the workflow on push events
push:
branches:
- main
#- preview
branches:
- main
- preview

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

# Build and deploy to preview site on push to preview branch
Build-Preview:
if: ${{ github.ref == 'refs/heads/preview' }}
uses: ./.github/workflows/called-workflow-build-sync-testing.yml
with:
doc-repo: ${{ inputs.doc-repo }}
doc-url: ${{ inputs.doc-repo }}
secrets: inherit

Update-DBR-Core-On-Main-Change:
if: ${{ github.ref == 'refs/heads/main' }}
uses: ./.github/workflows/called-workflow-build-sync-production.yml
Expand Down Expand Up @@ -287,7 +296,7 @@ jobs:
# #- uses: actions/checkout@v2
#
# # Runs a set of commands using the runners shell
#
#
# - name: Build DNT Doc
# run: |
# cd /home/ubuntu
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

.DS_Store
/.vs
/.history
/.history
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ gem "jekyll-readme-index", group: :jekyll_plugins
gem "jekyll-seo-tag", group: :jekyll_plugins
gem "uri"
gem "net"
gem "kramdown-parser-gfm"
gem "kramdown-parser-gfm"
2 changes: 1 addition & 1 deletion _includes/auto-version-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{%- else -%}
{%- assign validVerInfo = site.data.product_version.version_info_list -%}
{%- endif -%}

{%- if site.data.product_version.useGroupedVersion -%}
{%- for verInfo in validVerInfo -%}
{%- assign curVerText = "" -%}
Expand Down
6 changes: 3 additions & 3 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{%- assign excludeFlag = true -%}
{%- endif -%}

{%- if page.url contains 'search.html' or page.url contains 'search-test.html' -%}
{%- if page.url contains 'search.html' or page.url contains 'search-test.html' -%}
{%- assign excludeFlag = true -%}
{%- endif -%}

Expand All @@ -40,13 +40,13 @@

{%- assign docFullPath = site.docFullPath -%}
{%- assign docFullPathLastChar = docFullPath | split:'' | last -%}
{%- if docFullPathLastChar contains '/' -%}
{%- if docFullPathLastChar contains '/' -%}
{%- assign truncateDocHomePageSize = docFullPath | size | minus:1 -%}
{%- assign docFullPath = docFullPath | slice: 0, truncateDocHomePageSize -%}
{%- endif -%}
<link href="{{ docFullPath }}{{ targetUrl }}" rel="canonical">

{%- assign assetsPath = '/webres/wwwroot' -%}
{%- assign assetsPath = 'https://www.dynamsoft.com/webres/wwwroot' -%}s

<link rel="preload" as="font" href="{{ site.assets }}font-face/Oswald-Regular.ttf" type="font/ttf" crossorigin="anonymous">
<link rel="preload" as="font" href="{{ site.assets }}font-face/OpenSans-Regular.woff" type="font/woff" crossorigin="anonymous">
Expand Down
9 changes: 4 additions & 5 deletions _includes/liquid_autoGenerateHistoryList.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{%- endif -%}

{%- if curPageVersion contains "latest version" -%}
<p class="currentVersion fontOswald">{{ curPageVersion }}</p>
<p class="currentVersion fontOswald">{{ curPageVersion }}</p>
{%- else -%}
<p class="currentVersion fontOswald">{{ "version " | append: curPageVersion }}</p>
{%- endif -%}
Expand Down Expand Up @@ -58,7 +58,7 @@
{%- endif -%}
{%- endfor -%}
{%- endif -%}

{%- if curPageVersion == tmpPageVersion -%}
{%- continue -%}
{%- endif -%}
Expand All @@ -78,7 +78,7 @@
{%- endif -%}
{%- endfor -%}
{%- endif -%}

{%- if tmpUsedToMatchUrl != curUsedToMatchUrl -%}
{%- continue -%}
{%- endif -%}
Expand All @@ -98,7 +98,7 @@

{%- assign firstLevelUrl = site.firstLevelUrl -%}
{%- assign firstLevelUrlLastChar = firstLevelUrl | split:'' | last -%}
{%- if firstLevelUrlLastChar contains '/' -%}
{%- if firstLevelUrlLastChar contains '/' -%}
{%- assign truncateDocHomePageSize = firstLevelUrl | size | minus:1 -%}
{%- assign firstLevelUrl = firstLevelUrl | slice: 0, truncateDocHomePageSize -%}
{%- endif -%}
Expand All @@ -112,4 +112,3 @@
{%- assign historyRecode = historyRecode | append: '\nextUrlRecode\' | append: tmpPageVersion -%}
{%- endfor -%}
</ul>

2 changes: 1 addition & 1 deletion _includes/liquid_generateFullTree.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@
</li>
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- endfor -%}
6 changes: 3 additions & 3 deletions _includes/liquid_searchVersionTreeFile.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
{%- else -%}
{%- assign verDiff = tmpDiff | divided_by: 10 | divided_by: i -%}
{%- endif -%}
{%- assign validVer = true -%}
{%- assign validVer = true -%}
{%- break -%}
{%- elsif curVal < targetVal -%}
{%- assign needCheckSize = false -%}
Expand All @@ -63,7 +63,7 @@
{%- assign verDiff = curVal | divided_by: 10 -%}
{%- else -%}
{%- assign verDiff = curVal | divided_by: 10 | divided_by: minSize -%}
{%- endif -%}
{%- endif -%}
{%- endif -%}
{% endunless %}
{%- if validVer -%}
Expand Down Expand Up @@ -91,4 +91,4 @@
{%- assign curDirPath = nearestFile | remove: needRemoveStr -%}
{%- endif -%}
{%- include {{ nearestFile }} ver=include.ver curPath=curDirPath lang=include.lang -%}
{%- endif -%}
{%- endif -%}
2 changes: 1 addition & 1 deletion _includes/livehelp.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
<script>
var _hsq = window._hsq = window._hsq || [];
_hsq.push(['setContentType', 'knowledge-article']);
</script>
</script>
2 changes: 1 addition & 1 deletion _includes/main-page-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@

{%- if page.latestPageUri -%}
<input id="latestPageUri" type="hidden" value="{{page.latestPageUri}}" />
{%- endif -%}
{%- endif -%}
2 changes: 1 addition & 1 deletion _includes/page_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -508,4 +508,4 @@
</div>
</header>

<div id="menuMask"></div>
<div id="menuMask"></div>
2 changes: 1 addition & 1 deletion _includes/productNav.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
{%- endif -%}
{%- if site.firstLevelUrl contains 'remote-scan/docs' -%}
{%- include productNav/remoteScanNav.html -%}
{%- endif -%}
{%- endif -%}
2 changes: 1 addition & 1 deletion _includes/productNav/companyNav.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
</ul>
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion _includes/productNav/dbrNav.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@
</div>
</div>
</div>
</div>
</div>
3 changes: 1 addition & 2 deletions _includes/productNav/dceNav.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@
<li class="item"><a href="{{site.frontPageFolder}}">Documentation</a></li>
</ul>
</li>

<li class="item textUpperCase"><a class="orangeLink" href="{{site.overview}}">Free trial</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion _includes/productNav/dcpNav.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
</div>
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion _includes/productNav/dcvNav.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
</div>
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion _includes/productNav/ddnNav.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
</div>
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion _includes/productNav/dlrNav.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@
</div>
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion _includes/productNav/dwtNav.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@
</div>
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion _includes/productNav/mrzNav.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
</div>
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion _includes/productNav/mwcNav.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
</div>
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion _includes/productNav/remoteScanNav.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
</div>
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion _includes/productNav_OLD.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
{%- endif -%}
{%- if site.firstLevelUrl contains 'company/docs' -%}
{%- include companyNav.html -%}
{%- endif -%}
{%- endif -%}
4 changes: 2 additions & 2 deletions _includes/search-input.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<div class="hit-content">${components.Snippet({ hit, attribute: 'content' })}</div>
</div>
`
}
}
}
})
]);
Expand Down Expand Up @@ -203,4 +203,4 @@
window.location.href = preUrl + "/docs/search.html?q=" + $("#searchbox").val()
}
})
</script>
</script>
4 changes: 2 additions & 2 deletions _includes/trialLicense.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{%- assign assetsPath = '/webres/wwwroot' -%}
{%- assign assetsPath = 'https://www.dynamsoft.com/webres/wwwroot' -%}
<link href="{{assetsPath}}/css/intlTelInput.min.css" rel="stylesheet" />
<script src="{{assetsPath}}/js/intlTelInput.min.js"></script>
<script src="{{assetsPath}}/js/docs/dayjs.min.js"></script>
Expand Down Expand Up @@ -335,4 +335,4 @@
</div>
</div>

<script src="{{ assetsPath }}/js/docs/trialLicense.js"></script>
<script src="{{ assetsPath }}/js/docs/trialLicense.js"></script>
Loading