aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2020-04-01 14:51:18 +0200
committerLinus Jahn <lnj@kaidan.im>2020-04-01 15:26:45 +0200
commit4a09a18ff1d786c5fdea7b1992f6937fa7cbc833 (patch)
tree487afb6da9699b01a034f5ce4dede6ffde372025
parentaac82e6884a0db5345d3f43b1916f725349b2e4c (diff)
downloadqxmpp-4a09a18ff1d786c5fdea7b1992f6937fa7cbc833.tar.gz
actions: Push documentation to doc.qxmpp.org
-rw-r--r--.github/workflows/push-docs.yml22
-rwxr-xr-xtests/travis/install-build-depends2
-rwxr-xr-xtests/travis/push-documentation47
3 files changed, 70 insertions, 1 deletions
diff --git a/.github/workflows/push-docs.yml b/.github/workflows/push-docs.yml
new file mode 100644
index 00000000..0ab8293e
--- /dev/null
+++ b/.github/workflows/push-docs.yml
@@ -0,0 +1,22 @@
+---
+name: push-docs
+
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ push-doc:
+ runs-on: ubuntu-latest
+ env:
+ PUSH_KEY_REPO_DOC_QXMPP_ORG: ${{ secrets.PUSH_KEY_REPO_DOC_QXMPP_ORG }}
+ CONFIG: full
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install Qt
+ uses: jurplel/install-qt-action@v2
+ - name: Install extra packages
+ run: tests/travis/install-build-depends
+ - name: Build documentation
+ run: tests/travis/push-documentation
diff --git a/tests/travis/install-build-depends b/tests/travis/install-build-depends
index 3e543d91..c1c66dd1 100755
--- a/tests/travis/install-build-depends
+++ b/tests/travis/install-build-depends
@@ -16,7 +16,7 @@ else
case "$CONFIG" in
full*)
- sudo apt-get install -qq doxygen libgstreamer1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly
+ sudo apt-get install -qq doxygen graphviz libgstreamer1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly
;;
esac
fi
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
+