summaryrefslogtreecommitdiff
path: root/deploy
diff options
context:
space:
mode:
authorStefan Kreutz <mail@skreutz.com>2022-04-28 14:55:17 +0200
committerStefan Kreutz <mail@skreutz.com>2022-04-28 14:55:17 +0200
commit3ba902a37daa8f28552ca43665458f97d0634e26 (patch)
tree94a2270849d626d21422a624c0637d19eb09fe41 /deploy
parente699c3ec492b7c9128f4c89d71e6b9aec3c4fbda (diff)
downloadblog-3ba902a37daa8f28552ca43665458f97d0634e26.tar
Move shell scripts to dedicated directory
Diffstat (limited to 'deploy')
-rwxr-xr-xdeploy58
1 files changed, 0 insertions, 58 deletions
diff --git a/deploy b/deploy
deleted file mode 100755
index 0a37a83..0000000
--- a/deploy
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /bin/sh
-
-# Deploy the static website.
-#
-# Re-generates the static website from source and asserts a clean working tree
-# before uploading the website to the server.
-#
-# Submits the sitemap URL to Google and Bing.
-
-set -o errexit
-set -o nounset
-
-# Git root directory
-root="$( git rev-parse --show-toplevel )"
-
-# Source directory with a trailing slash for rsync
-src="${root}/_site/"
-
-# Git revision
-rev="$( git rev-parse --verify HEAD )"
-
-# ISO 8601 timestamp
-now="$( date -u "+%Y-%m-%dT%H:%M:%SZ" )"
-
-# Archive file name
-archive="./${now}_${rev}.tar.gz"
-
-printf "Re-generating static website from source ...\\n"
-( cd "${root}" \
- && cabal v2-run exe:site -- clean >/dev/null 2>&1 \
- && cabal v2-run exe:site -- build >/dev/null 2>&1 )
-
-[ -z "$( git status --porcelain )" ] || {
- ( >&2 printf "error: dirty working tree\\n" )
- printf "Aborting deployment due to unstaged changes or untracked files.\\n"
- exit 1
-}
-
-openrsync --rsync-path=openrsync --archive --delete --verbose \
- "${src}" "engine.skreutz.com:/var/www/htdocs/www.skreutz.com"
-
-tar -czf "${archive}" "${src}"
-scp "${archive}" engine.skreutz.com:archive/www/
-rm "${archive}"
-
-curl \
- --silent \
- --output /dev/null \
- http://www.google.com/ping?sitemap=https://www.skreutz.com/sitemap.xml \
- || ( >&2 printf "error: failed to submit live sitemap to google.com\\n" )
-
-curl \
- --silent \
- --output /dev/null \
- http://www.bing.com/ping?sitemap=https%3A%2F%2Fwww.skreutz.com/sitemap.xml \
- || ( >&2 printf "error: failed to submit live sitemap to bing.com\\n" )
-
-/bin/sh "${root}/check"
Generated by cgit. See skreutz.com for my tech blog and contact information.