forked from eclipse-cyclonedds/cyclonedds-python
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Thijs Miedema
committed
Jun 23, 2021
1 parent
44cbf0a
commit f6ccaf8
Showing
3 changed files
with
102 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# | ||
# Copyright(c) 2021 ADLINK Technology Limited and others | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Eclipse Public License v. 2.0 which is available at | ||
# http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License | ||
# v. 1.0 which is available at | ||
# http://www.eclipse.org/org/documents/edl-v10.php. | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
# | ||
|
||
# | ||
# Azure Pipeline specifically for building and publishing documentation | ||
# | ||
|
||
trigger: | ||
tags: | ||
include: | ||
- '*' | ||
branches: | ||
include: | ||
- 'master' | ||
- 'releases/*' | ||
pr: none | ||
|
||
pool: | ||
vmImage: ubuntu-20.04 | ||
|
||
steps: | ||
- task: UsePythonVersion@0 | ||
name: install_python | ||
displayName: Install Python | ||
- bash: | | ||
echo "###vso[task.setvariable variable=pip_cache;]$(pip cache dir)" | ||
displayName: Obtain pip cache path | ||
- task: Cache@2 | ||
inputs: | ||
key: pip-docs | 4 | $(Agent.OS) | ||
path: $(pip_cache) | ||
name: cache_pip | ||
displayName: Retrieve pip cache | ||
- bash: | | ||
set -e -x | ||
cd docs | ||
pip install --upgrade pip | ||
pip install -r requirements.txt --user --upgrade | ||
name: install_sphinx | ||
displayName: Install Python dependencies | ||
- bash: | | ||
set -e -x | ||
cd docs | ||
mkdir build | ||
sphinx-build -b html -j auto -v ./source ./build | ||
name: run_sphinx | ||
displayName: Run Sphinx | ||
- bash: | | ||
set -e -x | ||
if [ "${BUILD_SOURCEBRANCHNAME}" = "master" ]; then | ||
version="latest" | ||
else | ||
version="$(echo ${BUILD_SOURCEBRANCHNAME} | sed -n -E 's#^.*[vV]?([0-9]+\.[0-9]+)\.[0-9]+((alpha|beta|rc)[0-9]*)?$#\1#p')" | ||
fi | ||
[ "${version}" != "" ] || exit 1 | ||
echo "###vso[task.setvariable variable=version;]${version}" | ||
name: figure_version | ||
displayName: Compute documentation version | ||
- task: PublishBuildArtifacts@1 | ||
displayName: Publish documentation artifact | ||
inputs: | ||
pathToPublish: docs/build | ||
artifactName: 'cyclonedds-python-docs-$(version)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
Sphinx>=3.3.1 | ||
sphinx-rtd-theme==0.5.0 | ||
Sphinx==4.0.2 | ||
sphinx-rtd-theme==0.5.2 | ||
typing_extensions>=3.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters