Skip to content
Snippets Groups Projects
Verified Commit d28174bf authored by Robert Eckelmann's avatar Robert Eckelmann Committed by Newbyte
Browse files

ci: add job to generate docs (MR 2266)

parent 974b76c0
Branches
Tags
1 merge request!2266Documentation setup
Pipeline #190842 passed
#!/bin/sh -e
# Description: create documentation with sphinx
# Options: native
# https://postmarketos.org/pmb-ci
# Ensure sphinx_rtd_theme is installed
if [ "$(id -u)" = 0 ]; then
set -x
apk -q add \
py3-sphinx_rtd_theme \
py3-sphinxcontrib-autoprogram
exec su "${TESTUSER:-build}" -c "sh -e $0"
fi
# Require sphinx to be installed on the host system
if [ -z "$(command -v sphinx-build)" ]; then
echo "ERROR: sphinx-build command not found, make sure it is in your PATH."
exit 1
fi
sphinx-build \
docs \
public \
# -E -a -v -T
......@@ -19,6 +19,7 @@ __pycache__/
# Distribution / packaging
.Python
public/
env/
develop-eggs/
dist/
......
......@@ -8,6 +8,7 @@ workflow:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_COMMIT_BRANCH == 'master'
- if: $CI_COMMIT_BRANCH == 'wip'
- if: $CI_COMMIT_BRANCH == 'docs'
before_script: &global_before_scripts
- ".ci/note.sh"
......@@ -62,3 +63,12 @@ mypy:
stage: lint
script:
- ".ci/mypy.sh"
docs:
stage: lint
script:
- apk add py3-sphinx py3-sphinx_rtd_theme
- ".ci/docs.sh"
artifacts:
paths:
- public
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment