Skip to content

Commit

Permalink
Ensure the latest changes are fetched and reset to the remote branch
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomrsantos committed Jun 14, 2024
1 parent ca09c0c commit 532134f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,21 @@ jobs:
run: |
cd subdoc
# Ensure the latest changes are fetched and reset to the remote branch
git fetch origin gh-pages
git reset --hard origin/gh-pages
rm -rf docs
mv ../site docs
git add .
if git diff-index --quiet HEAD --; then
echo "No changes to commit"
else
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
# Pull the latest changes to avoid conflicts
git pull origin gh-pages --rebase

git commit -m "update website"
git push origin gh-pages
fi

0 comments on commit 532134f

Please sign in to comment.