mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-03 20:34:26 +02:00
Another try to make docs deployment
This commit is contained in:
38
.travis.yml
38
.travis.yml
@@ -1,22 +1,22 @@
|
|||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- CONAN_RUN_TESTS: 1
|
- CONAN_RUN_TESTS: 1
|
||||||
- CONAN_DOCKER_32_IMAGES: 1
|
- CONAN_DOCKER_32_IMAGES: 1
|
||||||
|
|
||||||
linux: &linux
|
linux: &linux
|
||||||
os: linux
|
os: linux
|
||||||
dist: xenial
|
dist: xenial
|
||||||
language: python
|
language: python
|
||||||
python: "3.7"
|
python: "3.7"
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
osx: &osx
|
osx: &osx
|
||||||
os: osx
|
os: osx
|
||||||
language: generic
|
language: generic
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- <<: *linux
|
- <<: *linux
|
||||||
env: CONAN_GCC_VERSIONS=9 CONAN_DOCKER_IMAGE=conanio/gcc9
|
env: CONAN_GCC_VERSIONS=9 CONAN_DOCKER_IMAGE=conanio/gcc9 DEPLOY_DOCS=TRUE
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- chmod +x .travis/install.sh
|
- chmod +x .travis/install.sh
|
||||||
@@ -25,17 +25,19 @@ install:
|
|||||||
script:
|
script:
|
||||||
- chmod +x .travis/run.sh
|
- chmod +x .travis/run.sh
|
||||||
- ./.travis/run.sh
|
- ./.travis/run.sh
|
||||||
|
- |
|
||||||
|
# Prepare documentation for deployment
|
||||||
|
if [ -n "$DEPLOY_DOCS" ]; then
|
||||||
|
./.travis/deploy.sh
|
||||||
|
fi
|
||||||
|
|
||||||
before_deploy:
|
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:
|
deploy:
|
||||||
provider: pages
|
provider: pages
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
|
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
|
||||||
keep_history: true
|
keep_history: true
|
||||||
local_dir: sphinx
|
local_dir: gh-pages
|
||||||
on:
|
on:
|
||||||
branch: master
|
branch: master
|
||||||
|
4
.travis/deploy.sh
Normal file
4
.travis/deploy.sh
Normal file
@@ -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
|
Reference in New Issue
Block a user