Skip to content

Commit

Permalink
Merge pull request #93 from PysioHub/main
Browse files Browse the repository at this point in the history
feat: Add Jenkinsfile
  • Loading branch information
pysio2007 authored Oct 26, 2024
2 parents e51383f + 0040c5c commit 575308a
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
pipeline {
agent {
docker {
image 'node:latest'
}
}
stages {
stage('Preflight') {
steps {
echo sh(returnStdout: true, script: 'env')
sh 'node -v'
sh 'npm -v' // 也打印 npm 版本
}
}
stage('Install') {
steps {
sh 'git log --reverse -1'
sh 'npm install'
}
}
stage('Build') {
steps {
sh 'npm run docs:build'
}
}
stage('Archive') {
steps {
sh "zip -r docs.zip src/.vuepress/dist/*"
archiveArtifacts artifacts: 'docs.zip', fingerprint: true
}
}
}
}

0 comments on commit 575308a

Please sign in to comment.