From a821eceaad2b6c8e3286a11f19ae6b46a6ec09b6 Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 27 Sep 2024 20:00:14 +0300 Subject: [PATCH] Docs JF --- ci/docs_en | 22 ++++++++++++++++++++++ ci/docs_ru | 21 +++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 ci/docs_en create mode 100644 ci/docs_ru diff --git a/ci/docs_en b/ci/docs_en new file mode 100644 index 000000000..3f4750e6b --- /dev/null +++ b/ci/docs_en @@ -0,0 +1,22 @@ +pipeline { + agent any + stages { + stage('Deploy') { + steps { + catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { + bat encoding: 'UTF-8', script:'chcp 65001 & oscript ./ci/os/docs_pagetranslate.os' + bat encoding: 'UTF-8', script:'chcp 65001 & xcopy "docs/en/md" "docs/docusaurus/docs" /s /e /i /y' + bat encoding: 'UTF-8', script:'chcp 65001 & cd docs/docusaurus & npm install' + bat encoding: 'UTF-8', script:'chcp 65001 & cd docs/docusaurus & "C:/Program Files (x86)/Yarn/bin/yarn" build' + withCredentials([string(credentialsId: 'neocities', variable: 'TOKEN')]) { + powershell encoding: 'UTF-8', script:'oint neocities СинхронизироватьКаталоги --token $ENV:TOKEN --local "C:/ProgramData/Jenkins/.jenkins/workspace/Docs deploy (EN)/docs/docusaurus/build"' + } + } + + bat encoding: 'UTF-8', script:'chcp 65001 & rmdir /s /q "C:/ProgramData/Jenkins/.jenkins/workspace/Docs deploy (EN)/docs/docusaurus/build"' + bat encoding: 'UTF-8', script:'chcp 65001 & rmdir /s /q "C:/ProgramData/Jenkins/.jenkins/workspace/Docs deploy (EN)/docs/docusaurus/node_modules"' + + } + } + } +} \ No newline at end of file diff --git a/ci/docs_ru b/ci/docs_ru new file mode 100644 index 000000000..46a7b83a2 --- /dev/null +++ b/ci/docs_ru @@ -0,0 +1,21 @@ +pipeline { + agent any + stages { + stage('Deploy') { + steps { + catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { + bat encoding: 'UTF-8', script:'chcp 65001 & xcopy "docs/ru/md" "docs/docusaurus/docs" /s /e /i /y' + bat encoding: 'UTF-8', script:'chcp 65001 & cd docs/docusaurus & npm install' + bat encoding: 'UTF-8', script:'chcp 65001 & cd docs/docusaurus & "C:/Program Files (x86)/Yarn/bin/yarn" build' + withCredentials([string(credentialsId: 'neocities', variable: 'TOKEN')]) { + powershell encoding: 'UTF-8', script:'oint neocities СинхронизироватьКаталоги --token $ENV:TOKEN --local "C:/ProgramData/Jenkins/.jenkins/workspace/Docs deploy (RU)/docs/docusaurus/build"' + } + } + + bat encoding: 'UTF-8', script:'chcp 65001 & rmdir /s /q "C:/ProgramData/Jenkins/.jenkins/workspace/Docs deploy (RU)/docs/docusaurus/build"' + bat encoding: 'UTF-8', script:'chcp 65001 & rmdir /s /q "C:/ProgramData/Jenkins/.jenkins/workspace/Docs deploy (RU)/docs/docusaurus/node_modules"' + + } + } + } +} \ No newline at end of file