Kaynağa Gözat

build docs for master only and copy into doc/current

Julius Pfrommer 8 yıl önce
ebeveyn
işleme
f04b0f598b
1 değiştirilmiş dosya ile 23 ekleme ve 0 silme
  1. 23 0
      tools/travis_linux_script.sh

+ 23 - 0
tools/travis_linux_script.sh

@@ -60,6 +60,29 @@ cd .. && rm build -rf && mkdir -p build && cd build
 echo "Compile multithreaded version"
 cmake -DENABLE_MULTITHREADING=ON -DBUILD_EXAMPLESERVER=ON ..
 make
+
+# push updated doc
+BRANCH=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
+if [[ "$BRANCH" = "master" ]]; then
+    cd .. && rm build -rf && mkdir -p build && cd build
+    cd build
+    rm -rf *
+    cmake -DBUILD_DOCUMENTATION=ON ..
+    make doc
+    git clone --depth=5 -b gh-pages https://$GITAUTH@github.com/acplt/open62541-www
+    cd open62541-www
+    git rm -r -f ./doc/current/*
+    cp -r ../doc/* ./doc/current/
+    git add -A ./doc/current
+    git config --global user.email "open62541-travis-ci@users.noreply.github.com"
+    git config --global user.name "Open62541 travis-ci"
+    git config --global push.default simple
+    git commit -am "gh-pages updated by travis-ci"
+    git push https://$GITAUTH@github.com/open62541/open62541-www
+    cd ..
+    rm -rf open62541-www
+fi
+
 cd .. && rm build -rf && mkdir -p build && cd build
 echo "Debug build and unit tests (64 bit)"
 cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_DEMO_NODESET=ON -DBUILD_UNIT_TESTS=ON -DBUILD_EXAMPLESERVER=ON -DENABLE_COVERAGE=ON ..