From bef76847ec686fcff92229d7b9be0bcfc7b267da Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 23 May 2023 12:37:40 +0930 Subject: [PATCH 1/3] feat(template_website): enable specifying the url slug !27 --- template/website.gitlab-ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 From bcb80358d9adb6b3a89fab1003f4434fb2949bdc Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 23 May 2023 12:42:16 +0930 Subject: [PATCH 2/3] ci(pages): add pages slug !27 --- .gitlab-ci.yml | 2 +- docs/projects/gitlab-ci/templates/website.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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. From e26f590ebcf284be949be4e1d337e1f587755446 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 23 May 2023 13:37:51 +0930 Subject: [PATCH 3/3] fix(md_linting): must lint on git tag !27 nofusscomputing/projects/docker-mail!3 --- lint/markdown.gitlab-ci.yaml | 7 +++++++ 1 file changed, 7 insertions(+) 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