ci: rework build_docs job

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2286>
environments/review-docs-poetr-umn39l/deployments/16928
jo 2023-01-19 02:21:08 +01:00
rodzic 66884a41f2
commit f79d71b594
1 zmienionych plików z 8 dodań i 12 usunięć

Wyświetl plik

@ -270,38 +270,34 @@ build_api_schema:
build_docs:
stage: build
image: python:3.11
needs:
- job: build_api_schema
artifacts: true
rules:
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
- changes: [docs/**/*]
image: $CI_REGISTRY/funkwhale/ci/python:3.11
variables:
BUILD_PATH: "../public"
GIT_STRATEGY: clone
GIT_DEPTH: 0
cache:
key: "$CI_PROJECT_ID__sphinx"
paths: [$PIP_CACHE_DIR]
before_script:
- cd docs
- apt-get update
- apt-get install -y graphviz
- pip install poetry
- poetry install
- git branch stable --track origin/stable || true
- git branch develop --track origin/develop || true
script:
- ./build_docs.sh
cache:
key: "$CI_PROJECT_ID__sphinx"
paths:
- "$PIP_CACHE_DIR"
artifacts:
expire_in: 2 weeks
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == "stable" || $CI_COMMIT_BRANCH == "develop"
when: always
- changes:
- docs/**/*
when: always
build_front:
stage: build