thp-lang.org/Jenkinsfile

44 lines
608 B
Plaintext
Raw Normal View History

2024-10-05 11:52:02 +00:00
pipeline {
stages {
stage('Install pnpm') {
2024-11-21 00:57:05 +00:00
agent {
docker {
image 'node:22'
}
}
2024-10-05 11:52:02 +00:00
steps {
sh 'npm i -g pnpm'
}
}
stage('Install dependencies') {
2024-11-21 00:57:05 +00:00
agent {
docker {
image 'node:22'
}
}
2024-10-05 11:52:02 +00:00
steps {
sh 'pnpm i'
}
}
stage('Buid') {
2024-11-21 00:57:05 +00:00
agent {
docker {
image 'node:22'
}
}
2024-10-05 11:52:02 +00:00
steps {
sh 'THP_BINARY=/var/bin/thp pnpm build'
2024-10-05 11:52:02 +00:00
}
}
stage('Deploy') {
steps {
2024-10-05 19:13:43 +00:00
sh 'rm -rf /var/www/thp-lang.org/*'
2024-10-05 19:12:21 +00:00
sh 'mv -f dist/* /var/www/thp-lang.org/'
sh 'docker-compose down || true'
sh 'docker-compose up -d'
2024-10-05 11:52:02 +00:00
}
}
}
}