Commit a0817df2 authored by Wohlgemuth, Jason's avatar Wohlgemuth, Jason
Browse files

ci: Add rules to gate jobs

parent 84946db6
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
workflow:
  auto_cancel:
    on_new_commit: interruptible

default:
  tags:
    - cpu
@@ -37,6 +41,7 @@ lint-and-validate:
  inherit:
    default: true
    variables: true
  interruptible: true
  script:
    - npm run lint
    - npm run format
@@ -46,7 +51,9 @@ build-and-publish:
  rules:
    - changes:
        - src/content/**/*
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
      if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
    - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
      when: never
  stage: build
  inherit:
    default: true