aboutsummaryrefslogtreecommitdiffstats
path: root/jjb/daily-jjb-doc-multiversion-update/include-doc-multiversion-upload.sh
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/daily-jjb-doc-multiversion-update/include-doc-multiversion-upload.sh')
-rw-r--r--jjb/daily-jjb-doc-multiversion-update/include-doc-multiversion-upload.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/jjb/daily-jjb-doc-multiversion-update/include-doc-multiversion-upload.sh b/jjb/daily-jjb-doc-multiversion-update/include-doc-multiversion-upload.sh
new file mode 100644
index 00000000..5c505d23
--- /dev/null
+++ b/jjb/daily-jjb-doc-multiversion-update/include-doc-multiversion-upload.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+set -e
+
+[[ -z "$WORKSPACE" ]] && WORKSPACE=$(pwd -P)
+HTDOCS=${HTDOCS:-$WORKSPACE/htdocs}
+TMPDIR=${TMPDIR:-$WORKSPACE/upload-gh}
+
+# publish the docs
+
+mkdir -p $TMPDIR
+git clone -b gh-pages git@github.com:automotive-grade-linux/docs-gh-pages.git $TMPDIR/upload-gh-pages
+cp -ar $HTDOCS/* $TMPDIR/upload-gh-pages/
+pushd $TMPDIR/upload-gh-pages
+ git config user.name build.automotivelinux.org
+ git config user.email jenkins@automotivelinux.org
+ git diff
+ git add .
+ git commit --amend -m"Render: $(date)"
+ git push origin gh-pages:gh-pages -f
+popd
+