migrate to Hugo + PaperMod
This commit is contained in:
17
Jenkinsfile
vendored
17
Jenkinsfile
vendored
@@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user