32 lines
577 B
Groovy
32 lines
577 B
Groovy
pipeline {
|
|
agent {
|
|
label 'linux'
|
|
}
|
|
options {
|
|
buildDiscarder(
|
|
logRotator(
|
|
numToKeepStr: '5'
|
|
)
|
|
)
|
|
}
|
|
|
|
stages {
|
|
stage('Build') {
|
|
steps {
|
|
sh 'dart doc'
|
|
sh 'tar -cvf docs.tgz doc/api/*'
|
|
}
|
|
}
|
|
|
|
stage('Deploy') {
|
|
steps {
|
|
sh 'dart pub publish -f'
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
archiveArtifacts artifacts: 'docs.tgz' onlyIfSuccessful: true
|
|
}
|
|
}
|
|
}
|