From 5dafd4fba77512b13327bf77c2c1df75f294a6e0 Mon Sep 17 00:00:00 2001 From: alschmiedt Date: Wed, 2 Dec 2020 16:07:20 -0800 Subject: [PATCH] Fix update gh pages (#4488) --- scripts/gulpfiles/git_tasks.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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(); } );