Loading .gitlab-ci.yml +31 −24 Original line number Diff line number Diff line # You can override the included template(s) by including variable overrides # SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings # Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/pipeline/#customization # Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings # Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings # Note that environment variables can be set in several places # See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence pages: stage: deploy image: python:3.9.18-slim-bullseye Loading @@ -6,11 +13,13 @@ pages: PAGES_BRANCH: gl-pages HTTPS_REMOTE: https://gitlab-ci-token:${CUSTOM_PROJECT_ACCESS_TOKEN}@${CI_SERVER_HOST}/rep/${CI_PROJECT_PATH}.git before_script: - pip install -q mkdocs-material mkdocs-glightbox mkdocs-markdownextradata-plugin mike - pip install -q mkdocs-material mkdocs-glightbox mkdocs-markdownextradata-plugin mike - apt-get update -qq && apt-get -qq install -y git > /dev/null - git config --global --replace-all user.name $GITLAB_USER_NAME - git config --global --replace-all user.email $GITLAB_USER_EMAIL - git fetch origin $PAGES_BRANCH && git checkout $PAGES_BRANCH || git checkout -b $PAGES_BRANCH origin/$PAGES_BRANCH || echo "Pages branch not deployed yet." - git fetch origin $PAGES_BRANCH && git checkout $PAGES_BRANCH || git checkout -b $PAGES_BRANCH origin/$PAGES_BRANCH || echo "Pages branch not deployed yet." - git checkout $CI_COMMIT_SHA script: - | Loading @@ -20,17 +29,15 @@ pages: elif [ "$CI_COMMIT_REF_NAME" == "develop" ]; then mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u $CI_COMMIT_BRANCH latest fi - git checkout $PAGES_BRANCH -- public/ artifacts: paths: - public/ rules: # This ensures that only pushes to the default branch will trigger # a pages deploy #- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH - if: '$CI_COMMIT_TAG' - if: '$CI_COMMIT_REF_NAME == "main"' - if: '$CI_COMMIT_REF_NAME == "develop"' - if: "$CI_COMMIT_TAG" - if: $CI_COMMIT_REF_NAME == "main" - if: $CI_COMMIT_REF_NAME == "develop" when: always - when: never include: - template: Security/SAST-IaC.latest.gitlab-ci.yml Loading
.gitlab-ci.yml +31 −24 Original line number Diff line number Diff line # You can override the included template(s) by including variable overrides # SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings # Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/pipeline/#customization # Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings # Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings # Note that environment variables can be set in several places # See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence pages: stage: deploy image: python:3.9.18-slim-bullseye Loading @@ -6,11 +13,13 @@ pages: PAGES_BRANCH: gl-pages HTTPS_REMOTE: https://gitlab-ci-token:${CUSTOM_PROJECT_ACCESS_TOKEN}@${CI_SERVER_HOST}/rep/${CI_PROJECT_PATH}.git before_script: - pip install -q mkdocs-material mkdocs-glightbox mkdocs-markdownextradata-plugin mike - pip install -q mkdocs-material mkdocs-glightbox mkdocs-markdownextradata-plugin mike - apt-get update -qq && apt-get -qq install -y git > /dev/null - git config --global --replace-all user.name $GITLAB_USER_NAME - git config --global --replace-all user.email $GITLAB_USER_EMAIL - git fetch origin $PAGES_BRANCH && git checkout $PAGES_BRANCH || git checkout -b $PAGES_BRANCH origin/$PAGES_BRANCH || echo "Pages branch not deployed yet." - git fetch origin $PAGES_BRANCH && git checkout $PAGES_BRANCH || git checkout -b $PAGES_BRANCH origin/$PAGES_BRANCH || echo "Pages branch not deployed yet." - git checkout $CI_COMMIT_SHA script: - | Loading @@ -20,17 +29,15 @@ pages: elif [ "$CI_COMMIT_REF_NAME" == "develop" ]; then mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u $CI_COMMIT_BRANCH latest fi - git checkout $PAGES_BRANCH -- public/ artifacts: paths: - public/ rules: # This ensures that only pushes to the default branch will trigger # a pages deploy #- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH - if: '$CI_COMMIT_TAG' - if: '$CI_COMMIT_REF_NAME == "main"' - if: '$CI_COMMIT_REF_NAME == "develop"' - if: "$CI_COMMIT_TAG" - if: $CI_COMMIT_REF_NAME == "main" - if: $CI_COMMIT_REF_NAME == "develop" when: always - when: never include: - template: Security/SAST-IaC.latest.gitlab-ci.yml