Skip to content

Commit 52661e1

Browse files
authored
Merge pull request #3316 from stan-dev/jenkins/gh-pages-build-tweaks
Jenkins: change how gh-pages branch gets re-built
2 parents a37a37c + c9047d9 commit 52661e1

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

Jenkinsfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -591,16 +591,15 @@ pipeline {
591591
usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD')]) {
592592
sh """#!/bin/bash
593593
set -x
594-
make doxygen
595594
git config user.email "mc.stanislaw@gmail.com"
596595
git config user.name "Stan Jenkins"
597-
git checkout --detach
598-
git branch -D gh-pages
599-
git push https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/stan-dev/math.git :gh-pages
600-
git checkout --orphan gh-pages
601-
git add -f doc
602-
git commit --author='Stan BuildBot <mc.stanislaw@gmail.com>' -m "auto generated docs from Jenkins"
603-
git subtree push --prefix doc/api/html https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/stan-dev/math.git gh-pages
596+
git worktree add doc/api/html gh-pages
597+
rm -rf doc/api/html/*
598+
make doxygen
599+
cd doc/api/html
600+
git add -f .
601+
git commit --author='Stan BuildBot <mc.stanislaw@gmail.com>' -m "auto generated docs from Jenkins" --amend
602+
git push https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/stan-dev/math.git gh-pages --force
604603
"""
605604
}
606605
}

0 commit comments

Comments
 (0)