Skip to content

Commit

Permalink
Merge pull request #24 from fellrock/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
fellrock authored Mar 5, 2024
2 parents 0eecc18 + dcc7597 commit 9492b90
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 18 deletions.
40 changes: 40 additions & 0 deletions jenkins/jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Testing
pipeline {
agent any

environment {
// Set the path where you want to copy the GitHub Pages contents
TARGET_FOLDER = '/mnt/user/appdata/nginx/www'
// Set the GitHub repository URL
GITHUB_REPO_URL = 'https://github.com/fellrock/fellrock.github.io.git'
}

stages {
stage('Clone GitHub Pages') {
steps {
// Clone the GitHub Pages repository
checkout([$class: 'GitSCM', branches: [[name: '*/master']], userRemoteConfigs: [[url: GITHUB_REPO_URL]]])
}
}

stage('Copy to Server') {
steps {
// Copy the contents to the specified folder on the home server
script {
sh "cp -R . $TARGET_FOLDER"
}
}
}
}

post {
success {
// Actions to be performed if the build is successful
echo 'GitHub Pages content copied successfully!'
}
failure {
// Actions to be performed if the build fails
echo 'Build failed. Please check the logs for details.'
}
}
}
18 changes: 0 additions & 18 deletions jenkinsfile

This file was deleted.

0 comments on commit 9492b90

Please sign in to comment.