mirror of
https://github.com/waku-org/js.waku.guide.git
synced 2025-02-22 19:58:13 +00:00
An attempt to get multi-language support with a simple site generator: https://gohugo.io/ Research issue: https://github.com/vacp2p/docs.dappconnect.dev/issues/7 Theme: https://themes.gohugo.io/themes/hugo-book/ I've dropped the Waku specs part for simplicity of the PR, you can re-add it later yourself @D4nte . Signed-off-by: Jakub Sokołowski <jakub@status.im>
51 lines
1.2 KiB
Groovy
51 lines
1.2 KiB
Groovy
pipeline {
|
|
agent { label 'linux' }
|
|
|
|
options {
|
|
disableConcurrentBuilds()
|
|
/* manage how many builds we keep */
|
|
buildDiscarder(logRotator(
|
|
numToKeepStr: '20',
|
|
daysToKeepStr: '30',
|
|
))
|
|
}
|
|
|
|
environment {
|
|
GIT_COMMITTER_NAME = 'status-im-auto'
|
|
GIT_COMMITTER_EMAIL = 'auto@status.im'
|
|
/* dev page settings */
|
|
DEV_SITE = 'dev-docs.dappconnect.dev'
|
|
DEV_HOST = 'jenkins@node-01.do-ams3.sites.misc.statusim.net'
|
|
SCP_OPTS = 'StrictHostKeyChecking=no'
|
|
}
|
|
|
|
stages {
|
|
stage('Build') {
|
|
steps {
|
|
sh "hugo ${env.GIT_BRANCH ==~ /.*master/ ? '' : "-b https://${DEV_SITE}"}"
|
|
}
|
|
}
|
|
|
|
stage('Publish Prod') {
|
|
when { expression { env.GIT_BRANCH ==~ /.*master/ } }
|
|
steps {
|
|
sshagent(credentials: ['status-im-auto-ssh']) {
|
|
sh "ghp-import -p public"
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Publish Devel') {
|
|
when { expression { env.GIT_BRANCH ==~ /.*develop/ } }
|
|
steps {
|
|
sshagent(credentials: ['jenkins-ssh']) {
|
|
sh """
|
|
rsync -e 'ssh -o ${SCP_OPTS}' -r --delete public/. \
|
|
${env.DEV_HOST}:/var/www/${env.DEV_SITE}/
|
|
"""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|