Skip to content

dwt 19.0 build file update #1969

dwt 19.0 build file update

dwt 19.0 build file update #1969

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the master branch
push:
branches:
- v19.0
# 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-v18-4:
if: ${{ github.ref == 'refs/heads/v19.0' }}
# The type of runner that the job will run on
runs-on: [self-hosted, doc-build]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Build the full site - main
run: |
cd ${{ runner.temp }}
mkdir -p DWTDocArchive
git clone --depth 1 --branch v19.0 https://${{ secrets.GIT_USER }}:${{ secrets.GIT_PAT }}@github.com/dynamsoft-docs/web-twain-docs.git web-twain-docs-archive
git clone --depth 1 --branch dwt-v19.0 https://github.com/dynamsoft-docs/Docs-Template-Repo.git Docs-Template-Repo-Archive
cp -rfp ./web-twain-docs-archive/* ./DWTDocArchive/
cp -rfp ./Docs-Template-Repo-Archive/* ./DWTDocArchive/
sed -i -e "1,3s/blob\/master$/blob\/v19.0/" \
-e "1,3s/blob\/main$/blob\/v19.0/" ${{ runner.temp }}/DWTDocArchive/_config.yml
cd DWTDocArchive && bundle install && bundle exec jekyll build
- name: Sync files
uses: SamKirkland/FTP-Deploy-Action@4.3.0
with:
server: ${{ secrets.FTP_DYNAMSOFT_LOCAL_SERVER }}
username: ${{ secrets.FTP_DYNAMSOFT_LOCAL_USER }}
password: ${{ secrets.FTP_DYNAMSOFT_LOCAL_PASSWORD }}
port: 21
local-dir: ${{ runner.temp }}/DWTDocArchive/_site/
server-dir: /www.dynamsoft.com/web-twain/docs-archive/v19.0/
- name: Trigger Webhook
run: |
curl -X POST -H "${{ secrets.WEBHOOK_USER }}" -H "${{ secrets.WEBHOOK_TOKEN }}" -H "Content-Type: application/json" -d "[\"/web-twain/docs-archive/v19.0/*\"]" ${{ secrets.WEBHOOK_URL }}