aboutsummaryrefslogtreecommitdiffstats
path: root/jjb/daily-jjb-doc-update/include-doc-upload.sh
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/daily-jjb-doc-update/include-doc-upload.sh')
-rw-r--r--jjb/daily-jjb-doc-update/include-doc-upload.sh23
1 files changed, 16 insertions, 7 deletions
diff --git a/jjb/daily-jjb-doc-update/include-doc-upload.sh b/jjb/daily-jjb-doc-update/include-doc-upload.sh
index 116f703f..731a122a 100644
--- a/jjb/daily-jjb-doc-update/include-doc-upload.sh
+++ b/jjb/daily-jjb-doc-update/include-doc-upload.sh
@@ -1,16 +1,25 @@
#!/bin/bash
+set -e
+set -x
+
+[[ -z "$WORKSPACE" ]] && WORKSPACE=$(pwd -P)
+HTDOCS=${HTDOCS:-$WORKSPACE/docs-webtemplate/build-dev/}
+TMPDIR=${TMPDIR:-$WORKSPACE/upload-gh}
+
# publish the docs
-pushd webdocs-agl
- git clone -b gh-pages git@github.com:automotive-grade-linux/docs-agl.git upload-gh-pages
- cp -ar build-dev/* upload-gh-pages/
- pushd upload-gh-pages
+
+ssh-keyscan -H github.com >> ~/.ssh/known_hosts
+
+mkdir -p $TMPDIR
+git clone -b gh-pages git@github.com:automotive-grade-linux/docs-gh-pages.git $TMPDIR/upload-gh-pages
+mkdir -p $TMPDIR/upload-gh-pages/next/
+cp -ar $HTDOCS/* $TMPDIR/upload-gh-pages/next/
+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
-popd
-
+popd \ No newline at end of file