Auto-deploy website on push to master
Adds a Jenkinsfile stage that copies website/index.html to the live nginx docroot whenever a change touches website/, so teammates can edit the site (via Gitea web UI or a normal PR) without needing VM access -- merge to master and it's live within one poll cycle (~5 min). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
d7abc9fb4b
commit
2fee57bd44
Vendored
+12
@@ -43,6 +43,18 @@ pipeline {
|
||||
sh './gradlew testDebugUnitTest --no-daemon --stacktrace'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Deploy website') {
|
||||
// Only runs when a push actually touches website/, so unrelated
|
||||
// app commits don't trigger a redeploy. Just a plain file copy --
|
||||
// nginx serves the file straight off disk, no reload needed.
|
||||
when {
|
||||
changeset 'website/**'
|
||||
}
|
||||
steps {
|
||||
sh 'cp website/index.html /var/www/pinpoint-site/index.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
|
||||
Reference in New Issue
Block a user