From 1d033912be9bc6d77f5a276f044b0fe7e48ce36c Mon Sep 17 00:00:00 2001 From: Sasha <118575614+weboko@users.noreply.github.com> Date: Tue, 23 Jul 2024 14:33:08 +0200 Subject: [PATCH] chore: create deploy step for nextjs apps (#76) --- ci/Jenkinsfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index c5d36ec..abdb796 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -42,7 +42,7 @@ pipeline { stage('experimental/rln-js') { steps { script { buildExample() } } } stage('experimental/rln-identity') { steps { script { buildExample() } } } stage('dogfooding') { steps { script { buildExample() } } } - stage('flush-notes') { steps { script { buildExample() } } } + stage('flush-notes') { steps { script { buildNextJSExample() } } } } } @@ -77,6 +77,16 @@ def buildExample(example=STAGE_NAME) { } } +def buildNextJSExample(example=STAGE_NAME) { + def dest = "${WORKSPACE}/build/docs/${example}" + dir("examples/${example}") { + sh 'npm install --silent' + sh 'npm run build' + sh "mkdir -p ${dest}" + sh "cp -r out/. ${dest}" + } +} + def copyExample(example=STAGE_NAME) { def source = "examples/${example}" def dest = "build/docs/${example}"