Skip to content

Commit 0d27f94

Browse files
committed
ci: set the readthedocs config to be used for all platform providers
1 parent 61c5596 commit 0d27f94

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

{{cookiecutter.project_name}}/{% if cookiecutter.repository_provider == 'bitbucket' %}.readthedocs.yml{% endif %} renamed to {{cookiecutter.project_name}}/.readthedocs.yml

File renamed without changes.

{{cookiecutter.project_name}}/README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,4 @@ Distributed under the terms of the **{{ cookiecutter.license }}** license. See [
9292
<!-- Reference Links -->
9393
[cookiecutter-robust-python]: https://github.com/56kyle/cookiecutter-robust-python
9494
95-
{% if cookiecutter.repository_provider == 'github' %}
96-
[documentation]: https://{{ cookiecutter.repository_path.split('/')[0] }}.github.io/{{ cookiecutter.project_name.replace('_', '-') }}/
97-
{% elif cookiecutter.repository_provider == 'gitlab' %}
98-
[documentation]: https://{{ cookiecutter.repository_path.replace('/', '.') }}.gitlab.io/{{ cookiecutter.project_name.replace('_', '-') }}/
99-
{% else %}
10095
[documentation]: https://{{ cookiecutter.project_name.replace('_', '-') }}.readthedocs.io/
101-
{% endif %}

{{cookiecutter.project_name}}/{% if cookiecutter.repository_provider == 'gitlab' %}.gitlab-ci.yml{% endif %}

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,27 @@ build-python:
249249
- if: $CI_COMMIT_BRANCH == "main"
250250
- if: $CI_PIPELINE_SOURCE == "web"
251251

252-
# Documentation build (GitLab Pages)
252+
# Documentation build validation (ReadTheDocs handles hosting)
253+
build-docs:
254+
stage: build
255+
<<: *uv-cache
256+
script:
257+
- uvx nox -s build-docs
258+
after_script:
259+
- uv cache prune --ci
260+
artifacts:
261+
paths:
262+
- docs/_build/html/
263+
expire_in: 5 days
264+
<<: *on-merge-requests-and-main
265+
changes:
266+
- "docs/**/*"
267+
- "src/**/*.py"
268+
- "noxfile.py"
269+
- "pyproject.toml"
270+
- ".gitlab-ci.yml"
271+
272+
# Documentation build (GitLab Pages - fallback/mirror)
253273
pages:
254274
stage: build
255275
<<: *uv-cache

0 commit comments

Comments
 (0)