Skip to content

Commit

Permalink
chore: create deploy step for nextjs apps (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
weboko authored Jul 23, 2024
1 parent 63e0c05 commit 1d03391
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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() } } }
}
}

Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit 1d03391

Please sign in to comment.