From ba09c140c812ece430726cc1dcdedb04b902b4c9 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sun, 4 Nov 2018 17:09:27 +0100 Subject: [PATCH] ping serach engines upon live deployment --- scripts/deploy.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index d15d25f1..62520063 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -6,6 +6,8 @@ # AWS_DEFAULT_REGION AWS_S3_BUCKET="kremalicious.com" AWS_S3_BUCKET_BETA="beta.kremalicious.com" +SITEMAP_URL="https%3A%2F%2Fkremalicious.com%2Fsitemap.xml" + # set -e; @@ -29,6 +31,12 @@ elif [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] | s3sync $AWS_S3_BUCKET + # ping search engines + # returns: HTTP_STATUSCODE URL + curl -sL -w "%{http_code} %{url_effective}\\n" \ + "http://www.google.com/webmasters/tools/ping?sitemap=$SITEMAP_URL" -o /dev/null \ + "http://www.bing.com/webmaster/ping.aspx?siteMap=$SITEMAP_URL" -o /dev/null + echo "---------------------------------------------" echo " ✓ done deployment " echo "---------------------------------------------"