Fix docs.yml vercel.json handling (#20007)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Glenn Jocher 2025-04-04 01:56:06 +02:00 committed by GitHub
parent 1c811055e5
commit da2b4245ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,8 +103,14 @@ jobs:
run: |
git clone --depth 1 --branch gh-pages https://github.com/ultralytics/docs.git docs-repo
cd docs-repo
find . -mindepth 1 -not -name "vercel.json" -exec rm -rf {} \; 2>/dev/null || true
if [ -f "vercel.json" ]; then
cp vercel.json /tmp/vercel.json
fi
rm -rf *
cp -R ../site/* .
if [ -f "/tmp/vercel.json" ]; then
cp /tmp/vercel.json .
fi
echo "${{ secrets.INDEXNOW_KEY_DOCS }}" > "${{ secrets.INDEXNOW_KEY_DOCS }}.txt"
git add .
if git diff --staged --quiet; then