From 6f62e36ce9bd7df5806b78eeb24a3633eb45443d Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sun, 2 Dec 2018 00:10:05 +0100 Subject: [PATCH] updates --- package.json | 26 +++++++++++++------------- scripts/deploy.sh | 29 +++++++++++++++++++++++++++-- 2 files changed, 40 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 6a57b52..c51b314 100644 --- a/package.json +++ b/package.json @@ -22,20 +22,20 @@ }, "dependencies": { "file-saver": "^2.0.0", - "gatsby": "^2.0.55", - "gatsby-image": "^2.0.20", + "gatsby": "^2.0.60", + "gatsby-image": "^2.0.22", "gatsby-plugin-favicon": "^3.1.4", "gatsby-plugin-matomo": "^0.5.1", - "gatsby-plugin-offline": "^2.0.17", - "gatsby-plugin-react-helmet": "^3.0.2", - "gatsby-plugin-sass": "^2.0.4", - "gatsby-plugin-sharp": "^2.0.13", - "gatsby-plugin-sitemap": "^2.0.2", + "gatsby-plugin-offline": "^2.0.18", + "gatsby-plugin-react-helmet": "^3.0.4", + "gatsby-plugin-sass": "^2.0.5", + "gatsby-plugin-sharp": "^2.0.14", + "gatsby-plugin-sitemap": "^2.0.3", "gatsby-plugin-svgr": "^2.0.1", - "gatsby-source-filesystem": "^2.0.8", - "gatsby-transformer-json": "^2.1.5", - "gatsby-transformer-sharp": "^2.1.8", - "gatsby-transformer-yaml": "^2.1.5", + "gatsby-source-filesystem": "^2.0.10", + "gatsby-transformer-json": "^2.1.6", + "gatsby-transformer-sharp": "^2.1.9", + "gatsby-transformer-yaml": "^2.1.6", "giphy-js-sdk-core": "^1.0.6", "graphql": "^0.13.2", "intersection-observer": "^0.5.1", @@ -68,10 +68,10 @@ "lighthouse": "^4.0.0-alpha.2-3.2.1", "ora": "^3.0.0", "prepend": "^1.0.2", - "prettier": "^1.15.1", + "prettier": "^1.15.3", "prettier-stylelint": "^0.4.2", "slugify": "^1.3.3", - "stylelint": "^9.8.0", + "stylelint": "^9.9.0", "stylelint-config-css-modules": "^1.3.0", "stylelint-config-standard": "^18.2.0", "why-did-you-update": "^1.0.6" diff --git a/scripts/deploy.sh b/scripts/deploy.sh index e7eedc8..b15676b 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -6,13 +6,32 @@ # AWS_DEFAULT_REGION AWS_S3_BUCKET="matthiaskretschmann.com" AWS_S3_BUCKET_BETA="beta.matthiaskretschmann.com" +SITEMAP_URL="https%3A%2F%2Fmatthiaskretschmann.com%2Fsitemap.xml" # set -e; function s3sync { - aws s3 sync ./public s3://"$1" --exclude "*.html" --exclude "*.js" --cache-control max-age=31536000,public --delete --acl public-read + aws s3 sync ./public s3://"$1" \ + --exclude "*" \ + --include "*.js" \ + --include "*.css" \ + --include "static/*" \ + --include "icons/*" \ + --exclude "sw.js" \ + --exclude "workbox*/*" \ + --cache-control public,max-age=31536000,immutable \ + --delete \ + --acl public-read \ + --quiet - aws s3 sync ./public s3://"$1" --exclude "*" --include "*.html" --include "*.js" --cache-control max-age=0,no-cache,no-store,must-revalidate --delete --acl public-read + aws s3 sync ./public s3://"$1" \ + --exclude "*" \ + --include "*.html" \ + --include "sw.js" \ + --cache-control public,max-age=0,must-revalidate \ + --delete \ + --acl public-read \ + --quiet } ## @@ -29,6 +48,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 "---------------------------------------------"