Add re-synchronization of `gh-pages` branch in 'docs-prep.sh'

This commit is contained in:
Julien Déramond 2025-05-06 16:58:08 +02:00
parent cababca0b9
commit 6fb43fb737
No known key found for this signature in database
GPG Key ID: EE5F274EA1F477FA
1 changed files with 12 additions and 0 deletions

View File

@ -76,6 +76,18 @@ if [ $? -ne 0 ]; then
fi fi
print_success "Switched to gh-pages branch" print_success "Switched to gh-pages branch"
git reset --hard origin/gh-pages
if [ $? -ne 0 ]; then
print_error "Failed to reset to origin/gh-pages. Check your git configuration."
fi
print_success "Reset to origin/gh-pages"
git pull origin gh-pages
if [ $? -ne 0 ]; then
print_error "Failed to pull from origin/gh-pages. Check your network connection and git configuration."
fi
print_success "Pulled latest changes from origin/gh-pages"
# Step 4: Create a new branch for the update # Step 4: Create a new branch for the update
print_info "Creating new branch ${NEW_BRANCH}" print_info "Creating new branch ${NEW_BRANCH}"
execute "git checkout -b ${NEW_BRANCH}" execute "git checkout -b ${NEW_BRANCH}"