[site] Add site serving skeleton and scripts
Add a skeleton hugo configuration that contains deployment targets for
updating the public and staging websites. Also add the docker source
and scripts for updating the redirector container, which is responsible
for moving incoming HTTP requests to HTTPS.
diff --git a/site/landing/deploy.sh b/site/landing/deploy.sh
new file mode 100755
index 0000000..123f1fc
--- /dev/null
+++ b/site/landing/deploy.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+# Copyright lowRISC contributors.
+# Licensed under the Apache License, Version 2.0, see LICENSE for details.
+# SPDX-License-Identifier: Apache-2.0
+
+set -e
+
+TARGET=$1
+
+case "${TARGET}" in
+ "public" | "staging")
+ ;;
+
+ *)
+ echo "You must specify either \"public\" or \"staging\""
+ exit 1
+ ;;
+esac
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+cd $DIR
+rm -rf public
+
+hugo --minify
+hugo deploy --target "${TARGET}" --confirm --verbose --maxDeletes -1
+
+if [ "${TARGET}" = "public" ]; then
+ # TODO: The ability to invalidate a Cloud CDN cache is pending in upstream
+ # hugo. Once it's landed this can be rolled into the hugo configuration.
+ gcloud compute url-maps invalidate-cdn-cache "opentitan-dot-org" --path="/*" \
+ --async
+fi