From ae4f9a1b2ae2067af0983450b22351f353698af2 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Tue, 10 Mar 2020 11:56:45 +0100 Subject: [PATCH] Another try to make docs deployment --- .travis.yml | 38 ++++++++++++++++++++------------------ .travis/deploy.sh | 4 ++++ 2 files changed, 24 insertions(+), 18 deletions(-) create mode 100644 .travis/deploy.sh diff --git a/.travis.yml b/.travis.yml index 533574ef..0bf97eeb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,22 @@ env: - global: - - CONAN_RUN_TESTS: 1 - - CONAN_DOCKER_32_IMAGES: 1 + global: + - CONAN_RUN_TESTS: 1 + - CONAN_DOCKER_32_IMAGES: 1 linux: &linux - os: linux - dist: xenial - language: python - python: "3.7" - services: - - docker + os: linux + dist: xenial + language: python + python: "3.7" + services: + - docker osx: &osx - os: osx - language: generic + os: osx + language: generic matrix: - include: - - <<: *linux - env: CONAN_GCC_VERSIONS=9 CONAN_DOCKER_IMAGE=conanio/gcc9 + include: + - <<: *linux + env: CONAN_GCC_VERSIONS=9 CONAN_DOCKER_IMAGE=conanio/gcc9 DEPLOY_DOCS=TRUE install: - chmod +x .travis/install.sh @@ -25,17 +25,19 @@ install: script: - chmod +x .travis/run.sh - ./.travis/run.sh + - | + # Prepare documentation for deployment + if [ -n "$DEPLOY_DOCS" ]; then + ./.travis/deploy.sh + fi before_deploy: - - conan search mp-units --raw - - conan search mp-units --raw 2>@1 | tail -n1 | xargs -I % conan info % --paths --package-filter mp-units* - - cp -r `conan search mp-units --raw 2>@1 | tail -n1 | xargs -I % conan info % --paths --package-filter mp-units* | sed -n 's/ package_folder: //p'`/share/doc/units/sphinx . deploy: provider: pages skip_cleanup: true github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard keep_history: true - local_dir: sphinx + local_dir: gh-pages on: branch: master diff --git a/.travis/deploy.sh b/.travis/deploy.sh new file mode 100644 index 00000000..1ee1f70a --- /dev/null +++ b/.travis/deploy.sh @@ -0,0 +1,4 @@ +rm -rf gh-pages +sudo -E docker run --name docker_deploy $CONAN_DOCKER_IMAGE /bin/sh -c "conan remote add conan-mpusz https://api.bintray.com/conan/mpusz/conan-mpusz" +sudo -E docker exec docker_deploy /bin/sh -c "conan search -r conan-mpusz mp-units --raw | tail -n1 | xargs -I % conan install % -g deploy -s compiler.version=$CONAN_GCC_VERSIONS -s compiler.cppstd=20" +sudo -E docker cp docker_deploy:/home/conan/mp-units/share/doc/units/sphinx gh-pages