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:
|
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
|
||||||
|
|
Loading…
Reference in New Issue