run indexnow script automatically

This commit is contained in:
Daniel Micay
2024-06-02 09:58:54 -04:00
parent da0717613c
commit 4b599c2421
3 changed files with 9 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-
for f in static-production/**.*(br|gz); do
touch -r "${f%.*}" "$f"
done
./generate-sitemap
changed="$(./generate-sitemap)"
xmllint --noblanks static-tmp/sitemap.xml --output static-tmp/sitemap.xml
brotli -f static-tmp/sitemap.xml
zopfli static-tmp/sitemap.xml
@@ -58,3 +58,7 @@ for server in ${servers[@]}; do
echo active is now $target
echo
done
if [[ -n "$changed" ]]; then
./indexnow <<< "$changed"
fi