diff --git a/scripts/gulpfiles/git_tasks.js b/scripts/gulpfiles/git_tasks.js index 35b737be7..dbac2093a 100644 --- a/scripts/gulpfiles/git_tasks.js +++ b/scripts/gulpfiles/git_tasks.js @@ -104,16 +104,17 @@ const createRC = gulp.series( // Update github pages with what is currently in develop. const updateGithubPages = gulp.series( - syncBranch('gh-pages'), function(done) { - execSync('git pull ' + upstream_url + ' develop', { stdio: 'inherit' }); + execSync('git stash save -m "Stash for sync"', { stdio: 'inherit' }); + execSync('git checkout gh-pages || git checkout -b gh-pages', { stdio: 'inherit' }); + execSync('git fetch upstream', { stdio: 'inherit' }); + execSync('git reset --hard upstream/develop', { stdio: 'inherit' }); done(); }, buildTasks.build, function(done) { execSync('git commit -am "Rebuild"', { stdio: 'inherit' }); - execSync('git push ' + upstream_url + ' gh-pages', { stdio: 'inherit' }); - execSync('git push origin gh-pages', { stdio: 'inherit' }); + execSync('git push ' + upstream_url + ' gh-pages --force', { stdio: 'inherit' }); done(); } );