Loading .gitlab-ci.yml +16 −14 Original line number Diff line number Diff line Loading @@ -4,10 +4,6 @@ include: - project: '$TBC_NAMESPACE/mkdocs' ref: '2' file: '/templates/gitlab-ci-mkdocs.yml' # S3 template - project: '$TBC_NAMESPACE/s3' ref: '7' file: '/templates/gitlab-ci-s3.yml' variables: # Default value; can be globally overridden Loading @@ -17,14 +13,9 @@ variables: MKD_LYCHEE_ENABLED: "true" MKD_LYCHEE_ARGS: "*.md docs/ static/" # deploy: landing page (static/), mkdocs build (public/), Angular build (kicker/dist/) and aggregated kicker (kicker-aggregated/) S3_DEPLOY_FILES: "static/ public/ kicker-aggregated.json" S3_STAGING_DISABLED: "true" S3_PROD_DISABLED: "true" S3_STAGING_PREFIX: "doc" # segregate review envs with prefixes S3_REVIEW_PREFIX: ${CI_COMMIT_REF_SLUG} S3_REVIEW_AUTOSTOP_DURATION: one week PAGES_PREFIX: "" # No prefix for main or master EXPIRE_IN: "never" # No expiration for main or master ENVIRONMENT_NAME: "production" stages: - codegen Loading Loading @@ -101,10 +92,21 @@ pages: - find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\|json\)$' -exec gzip -f -k {} \; # not available in image # - find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\|json\)$' -exec brotli -f -k {} \; pages: path_prefix: '$PAGES_PREFIX' expire_in: $EXPIRE_IN artifacts: name: "complete site from $CI_COMMIT_REF_SLUG" paths: - public expire_in: 1 day only: - master environment: name: '$ENVIRONMENT_NAME' url: $CI_PAGES_URL rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run on main or master with default PAGES_PREFIX (empty) - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH # Run on other branches with prefix CI_COMMIT_REF_SLUG variables: PAGES_PREFIX: '$CI_COMMIT_REF_SLUG' # Prefix with CI_COMMIT_REF_SLUG for other branches EXPIRE_IN: 4 hrs # Pages expire in 4 hours for other branches ENVIRONMENT_NAME: 'review/$CI_COMMIT_REF_SLUG' No newline at end of file Loading
.gitlab-ci.yml +16 −14 Original line number Diff line number Diff line Loading @@ -4,10 +4,6 @@ include: - project: '$TBC_NAMESPACE/mkdocs' ref: '2' file: '/templates/gitlab-ci-mkdocs.yml' # S3 template - project: '$TBC_NAMESPACE/s3' ref: '7' file: '/templates/gitlab-ci-s3.yml' variables: # Default value; can be globally overridden Loading @@ -17,14 +13,9 @@ variables: MKD_LYCHEE_ENABLED: "true" MKD_LYCHEE_ARGS: "*.md docs/ static/" # deploy: landing page (static/), mkdocs build (public/), Angular build (kicker/dist/) and aggregated kicker (kicker-aggregated/) S3_DEPLOY_FILES: "static/ public/ kicker-aggregated.json" S3_STAGING_DISABLED: "true" S3_PROD_DISABLED: "true" S3_STAGING_PREFIX: "doc" # segregate review envs with prefixes S3_REVIEW_PREFIX: ${CI_COMMIT_REF_SLUG} S3_REVIEW_AUTOSTOP_DURATION: one week PAGES_PREFIX: "" # No prefix for main or master EXPIRE_IN: "never" # No expiration for main or master ENVIRONMENT_NAME: "production" stages: - codegen Loading Loading @@ -101,10 +92,21 @@ pages: - find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\|json\)$' -exec gzip -f -k {} \; # not available in image # - find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\|json\)$' -exec brotli -f -k {} \; pages: path_prefix: '$PAGES_PREFIX' expire_in: $EXPIRE_IN artifacts: name: "complete site from $CI_COMMIT_REF_SLUG" paths: - public expire_in: 1 day only: - master environment: name: '$ENVIRONMENT_NAME' url: $CI_PAGES_URL rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run on main or master with default PAGES_PREFIX (empty) - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH # Run on other branches with prefix CI_COMMIT_REF_SLUG variables: PAGES_PREFIX: '$CI_COMMIT_REF_SLUG' # Prefix with CI_COMMIT_REF_SLUG for other branches EXPIRE_IN: 4 hrs # Pages expire in 4 hours for other branches ENVIRONMENT_NAME: 'review/$CI_COMMIT_REF_SLUG' No newline at end of file