diff --git a/Jenkinsfile b/Jenkinsfile index 6de58ec..843d37f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,8 +20,11 @@ pipeline { branch 'main' } steps { - sh 'mkdir -p dist' - sh 'npm run compile' + sh ''' + git checkout main + mkdir -p dist + npm run compile + ''' } } stage('git push') { @@ -36,8 +39,7 @@ pipeline { sh ''' git add . git commit -m "Update Compiled Adblock List" - git checkout main - git pull + git pull --rebase git push ''' }