Files
double-pendulum/Jenkinsfile
T

45 lines
823 B
Groovy

pipeline {
agent any
stages {
stage('Check') {
steps {
sh 'cargo check'
}
}
stage('Build') {
steps {
sh 'wasm-pack build --target web'
archiveArtifacts artifacts: 'pkg/'
}
}
stage('Build docs') {
steps {
sh 'cargo doc'
archiveArtifacts artifacts: 'target/doc'
}
}
stage('Deploy') {
steps {
sh 'rm -r /var/www/zwietering.eu/projects/double-pendulum'
sh 'mkdir /var/www/zwietering.eu/projects/double-pendulum'
sh 'cp -r ./pkg/* /var/www/zwietering.eu/projects/double-pendulum'
}
}
stage('Deploy docs') {
steps {
sh 'cp -r ./target/doc/ /var/www/zwietering.eu/projects/double-pendulum'
}
}
}
post {
cleanup {
cleanWs()
}
}
}