update Jenkinsfile
This commit is contained in:
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@@ -4,18 +4,23 @@ pipeline {
|
|||||||
DEPLOY_PATH = '/var/www/codejava.tech'
|
DEPLOY_PATH = '/var/www/codejava.tech'
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Install Hugo') {
|
stage('Install Dependencies') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh '''
|
||||||
|
# Install Hugo
|
||||||
curl -sL https://github.com/gohugoio/hugo/releases/download/v0.145.0/hugo_extended_0.145.0_linux-amd64.tar.gz \
|
curl -sL https://github.com/gohugoio/hugo/releases/download/v0.145.0/hugo_extended_0.145.0_linux-amd64.tar.gz \
|
||||||
-o hugo.tar.gz
|
-o hugo.tar.gz
|
||||||
tar -xzf hugo.tar.gz hugo
|
tar -xzf hugo.tar.gz hugo
|
||||||
|
|
||||||
|
# Install Go
|
||||||
|
curl -sL https://go.dev/dl/go1.24.1.linux-amd64.tar.gz -o go.tar.gz
|
||||||
|
tar -xzf go.tar.gz
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
sh './hugo --minify'
|
sh 'PATH=$PATH:$WORKSPACE/go/bin ./hugo --minify'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
|
|||||||
Reference in New Issue
Block a user