fix(mkdocs_build_website): renamed and normalized

renamed from website to docs and normalized the rules.
this template is for building docs for our website, so it's name should
reflect this

!34 fixes #30
This commit is contained in:
2023-05-29 10:08:26 +09:30
parent 18bc18c29b
commit 0bc7255453
3 changed files with 27 additions and 8 deletions

View File

@ -37,3 +37,24 @@
when: always
- when: never
.MKDocs_Build_Docs:
extends: .MKDocs_Build
variables:
MKDOCS_SOURCE_PATH: docs
needs:
- pipeline: $CI_PIPELINE_ID
job: 'Website.Lint'
rules:
- if: '$JOB_STOP_MKDOCS_BUILD'
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: $CI_COMMIT_TAG
when: on_success
- if: '$CI_COMMIT_BRANCH &&
( $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "pipeline")'
exists:
- "docs/index.md"
when: always
- when: never

View File

@ -23,7 +23,7 @@ include:
# templates
- local: $JOB_ROOT_DIR/template/ansible-role.gitlab-ci.yaml
- local: $JOB_ROOT_DIR/template/docker-image.gitlab-ci.yaml
- local: $JOB_ROOT_DIR/template/website.gitlab-ci.yaml
- local: $JOB_ROOT_DIR/template/mkdocs-documentation.gitlab-ci.yaml
#

View File

@ -7,15 +7,13 @@ include:
- local: $JOB_ROOT_DIR/lint/markdown.gitlab-ci.yaml
Website.Lint:
Documentation.Lint:
extends: .Lint_Markdown_Docs
Website.Build:
variables:
MKDOCS_SOURCE_PATH: docs
extends: .MKDocs_Build
needs: [ 'Website.Lint' ]
Documentation.Build:
extends: .MKDocs_Build_Docs
needs: [ 'Documentation.Lint' ]
pages:
@ -25,7 +23,7 @@ pages:
PAGES_ENVIRONMENT_PATH: ''
script:
- mv "$CI_PROJECT_DIR/artifacts/build/Website.Build/build" public
needs: [ 'Website.Build' ]
needs: [ 'Documentation.Build' ]
environment:
name: staging
url: $CI_PAGES_URL/$PAGES_ENVIRONMENT_PATH