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