ci: rework build_docs job
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2286>
This commit is contained in:
parent
66884a41f2
commit
f79d71b594
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue