[doc] Temporary hacky way to remove some unnecessary build-site artifacts.
Signed-off-by: Harry Callahan <hcallahan@lowrisc.org>
diff --git a/util/site/deploy.sh b/util/site/deploy.sh
index d636cc1..c6c1064 100755
--- a/util/site/deploy.sh
+++ b/util/site/deploy.sh
@@ -101,6 +101,7 @@
PROJECT="${OPENTITAN_ORG_ID}"
rm -rf ${build_dir}
${proj_root}/util/site/build-docs.sh build-staging
+ remove_cruft
gcloud storage cp -R --gzip-in-flight-all ${build_dir}/* gs://${PROJECT}-staging
}
@@ -110,9 +111,14 @@
PROJECT="${OPENTITAN_ORG_ID}"
rm -rf ${build_dir}
${proj_root}/util/site/build-docs.sh build
+ remove_cruft
gcloud storage cp -R --gzip-in-flight-all ${build_dir}/* gs://${PROJECT}-prod
}
+# Remove additional files from build directory that we don't need
+# TODO remove this when we are ready for .mdbookignore (https://github.com/rust-lang/mdBook/pull/1908)
+remove_cruft () { rm -rf ${build_dir}/book/.git ${build_dir}/book/.github ${build_dir}/book/build-site ${build_dir}/book/site ; }
+
#######
# CLI #
#######