ci: Always archive artifacts, only publish master

Sometimes, I want to see what the built site looks like before
publishing it.  For that, I'll push changes to a dev branch and let
Jenkins build the site as a tarball that I can download, extract, and
view locally.  Once I am satisfied, I'll merge the dev branch to master,
which Jenkins will build and publish to the live site.
master
Dustin 2025-08-25 23:15:57 -05:00
parent 59ef8ff5ad
commit 313bc6805e
2 changed files with 10 additions and 0 deletions

8
ci/Jenkinsfile vendored
View File

@ -26,9 +26,17 @@ pipeline {
sh '. ci/build.sh'
}
}
post {
success {
archiveArtifacts 'dustin.web.tar.xz'
}
}
}
stage('Publish') {
when {
branch 'master'
}
steps {
container('rsync') {
sshagent(['jenkins-web']) {

View File

@ -5,3 +5,5 @@ from json import dump
import sys
dump(load(sys.stdin), sys.stdout)
EOF
tar -cJf dustin.web.tar.xz -C public .