From 4a09a18ff1d786c5fdea7b1992f6937fa7cbc833 Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Wed, 1 Apr 2020 14:51:18 +0200 Subject: actions: Push documentation to doc.qxmpp.org --- tests/travis/push-documentation | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 tests/travis/push-documentation (limited to 'tests/travis/push-documentation') diff --git a/tests/travis/push-documentation b/tests/travis/push-documentation new file mode 100755 index 00000000..ed5609a8 --- /dev/null +++ b/tests/travis/push-documentation @@ -0,0 +1,47 @@ +#!/bin/bash + +# Add ssh push key +eval "$(ssh-agent -s)" +echo $PUSH_KEY_REPO_DOC_QXMPP_ORG | base64 -d | unxz | ssh-add - + +# Set up git +git config --global user.email "docsbot@qxmpp.org" +git config --global user.name "QXmpp Docs Bot" + +# +# Build documentation +# + +echo '-------------------------------------------' +echo 'Building documentation' +echo '-------------------------------------------' + +mkdir build +cd build + +cmake .. -DBUILD_DOCUMENTATION=ON + +make doc + +# +# Push documentation +# + +echo '-------------------------------------------' +echo 'Cloning doc.qxmpp.org repository' +echo '-------------------------------------------' + +git clone ssh://git@github.com/qxmpp-project/doc.qxmpp.org + +echo '-------------------------------------------' +echo 'Commiting and pushing documentation' +echo '-------------------------------------------' + +# delete old dev docs +rm -rf doc.qxmpp.org/qxmpp-dev +cp -r doc/html doc.qxmpp.org/qxmpp-dev + +git -C doc.qxmpp.org add . +git -C doc.qxmpp.org commit -m "Add documentation for QXmpp master" +git -C doc.qxmpp.org push + -- cgit v1.2.3