migrate to Hugo + PaperMod

This commit is contained in:
nik
2025-09-23 16:51:19 +03:00
parent adcb77aa47
commit 0b50d19e21
8 changed files with 49 additions and 375 deletions

17
Jenkinsfile vendored
View File

@@ -1,19 +1,28 @@
pipeline {
agent any
options { timestamps(); disableConcurrentBuilds() }
environment {
DEPLOY_HOST = 'web@23.26.156.61'
DEPLOY_PATH = '/srv/www/masha-site'
SSH_CRED_ID = 'web-ssh'
}
triggers {
githubPush()
}
stages {
stage('Checkout') {
steps { checkout scm }
stage('Checkout') { steps { checkout scm } }
stage('Build site') {
steps {
sh '''
if [ ! -f go.mod ]; then docker run --rm -u $(id -u):$(id -g) -v "$PWD":/src -w /src klakegg/hugo:ext-alpine hugo mod init site; fi
docker run --rm -u $(id -u):$(id -g) -v "$PWD":/src -w /src klakegg/hugo:ext-alpine hugo mod get -u github.com/adityatelange/hugo-PaperMod
docker run --rm -u $(id -u):$(id -g) -v "$PWD":/src -w /src klakegg/hugo:ext-alpine hugo --minify
'''
}
}
stage('Deploy') {
steps {
sshagent(credentials: [env.SSH_CRED_ID]) {
sh 'bash deploy/deploy.sh "$DEPLOY_HOST" "$DEPLOY_PATH"'
sh 'bash deploy/deploy.sh $DEPLOY_HOST $DEPLOY_PATH'
}
}
}