From 191d4a58afff1c3c0133a9f4af2dfcfee01db300 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sat, 26 Sep 2020 14:36:00 +0200 Subject: [PATCH] publishing script. --- tools/publish | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 tools/publish diff --git a/tools/publish b/tools/publish new file mode 100755 index 00000000..a08b405b --- /dev/null +++ b/tools/publish @@ -0,0 +1,24 @@ +#!/bin/bash + +# Compile and publish to web + +if [ ! -e "./docs" ] +then + echo "Wrong current directory: should be launched from DocScoDoc as" + echo " tools/publish" +fi + +# --- Build +if [ "$1" = "-b" ] +then + if [ "${CONDA_DEFAULT_ENV}" != "mkdocs" ] + then + echo "Please active mkdocs :" + echo " conda activate mkdocs" + exit 1 + fi + mkdocs build +fi + +# --- Publish +rsync -vaze ssh site scodoc.org:/var/www/html