Files
gitlab-ci/template/mkdocs-documentation.gitlab-ci.yaml
Jon 04e7e928e0 feat(ci_rules): add exists and changes for rules
now defined jobs check for existance of file and for changes
to launch a job

!41 #32
2023-06-02 15:26:35 +09:30

61 lines
1.5 KiB
YAML

# This gitlab-ci file is used for creating building pages directories for nofusscomputing.com.
# by including this file, the jobs will be autocreated and only for pages jobs.
include:
- local: $JOB_ROOT_DIR/.gitlab-ci_common.yaml
- local: $JOB_ROOT_DIR/mkdocs/.gitlab-ci.yml
- local: $JOB_ROOT_DIR/lint/markdown.gitlab-ci.yaml
Documentation.Lint:
extends: .Lint_Markdown_Docs
Documentation.Build:
extends: .MKDocs_Build_Docs
needs: [ 'Documentation.Lint' ]
# this name must always be called 'pages' so that gitlab pages work
pages:
stage: deploy
variables:
GIT_STRATEGY: none
script:
- mv "$CI_PROJECT_DIR/artifacts/build/Documentation.Build/build" public
needs: [ 'Documentation.Build' ]
environment:
name: staging
url: $CI_PAGES_URL/$PAGES_ENVIRONMENT_PATH
artifacts:
paths:
- public
rules:
- if: '$JOB_STOP_GITLAB_PAGES'
when: never
- if: # condition_dev_branch_push
$CI_COMMIT_BRANCH == "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- '{docs/**,pages/**}/*.md'
changes:
paths:
- '{docs/**,pages/**}/*.md'
compare_to: 'master'
when: always
- if: # condition_not_master_or_dev_push
$CI_COMMIT_BRANCH != "master" &&
$CI_COMMIT_BRANCH != "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- '{docs/**,pages/**}/*.md'
changes:
paths:
- '{docs/**,pages/**}/*.md'
compare_to: 'development'
allow_failure: true
when: manual
- when: never