diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4c62319..838cd5a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,7 @@ variables: MY_PROJECT_ID: "28543717" LICENSE_FINDER_CLI_OPTS: '--recursive' MDLINT_PATHS: "**/*.md **/**/*.md **/**/**/*.md **/**/**/**/*.md **/**/**/**/**/**/*.md #**CHANGELOG.md #CHANGELOG.md #website-template/** #.gitlab/**" - + PAGES_ENVIRONMENT_PATH: projects/gitlab-ci/ # Scanner doesn't Pickup multiple pip files. Disable and specify jobs with pip file. gemnasium-python-dependency_scanning: diff --git a/docs/projects/gitlab-ci/templates/website.md b/docs/projects/gitlab-ci/templates/website.md index 94ebb43..2f7ea36 100644 --- a/docs/projects/gitlab-ci/templates/website.md +++ b/docs/projects/gitlab-ci/templates/website.md @@ -8,6 +8,13 @@ about: https://gitlab.com/nofusscomputing/projects/gitlab-ci This template creates the jobs applicable to publishing pages to a website. The website in question is a static site built by MKDocs. + +## Docs ToDo + +- notate that var `PAGES_ENVIRONMENT_PATH:` can be set to the slug of the page to show and is used for launching the environment to the url that contains the docs index page. + + + !!! Note This template is specifically designed for deployment to https://nofusscomputing.com. However you _may_ be able to override the job definition to use it for your website. diff --git a/lint/markdown.gitlab-ci.yaml b/lint/markdown.gitlab-ci.yaml index cf89674..a616516 100644 --- a/lint/markdown.gitlab-ci.yaml +++ b/lint/markdown.gitlab-ci.yaml @@ -42,7 +42,14 @@ MD_LINT_CONFIG_PATH: "$CI_PROJECT_DIR/website-template" extends: .Lint_Markdown rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: never + - if: '$CI_COMMIT_TAG' + exists: + - "docs/index.md" + when: always - if: '$CI_COMMIT_BRANCH' exists: - "docs/index.md" + when: always - when: never \ No newline at end of file diff --git a/template/website.gitlab-ci.yaml b/template/website.gitlab-ci.yaml index acc8648..79ff7c4 100644 --- a/template/website.gitlab-ci.yaml +++ b/template/website.gitlab-ci.yaml @@ -22,12 +22,13 @@ pages: stage: deploy variables: GIT_STRATEGY: none + PAGES_ENVIRONMENT_PATH: '' script: - mv "$CI_PROJECT_DIR/artifacts/build/Website.Build/build" public needs: [ 'Website.Build' ] environment: name: staging - url: $CI_PAGES_URL/projects/gitlab-ci/ + url: $CI_PAGES_URL/$PAGES_ENVIRONMENT_PATH artifacts: paths: - public