Git pull docs before updating (#18163)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-12-10 18:20:14 +01:00 committed by GitHub
parent ab23b5dfd6
commit 5c31766b0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -99,6 +99,7 @@ jobs:
if git diff --staged --quiet; then
echo "No changes to commit"
else
git pull origin gh-pages
LATEST_HASH=$(git rev-parse --short=7 HEAD)
git commit -m "Update Docs for 'ultralytics ${{ steps.check_pypi.outputs.version }} - $LATEST_HASH'"
git push https://${{ secrets._GITHUB_TOKEN }}@github.com/ultralytics/docs.git gh-pages