diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 30019862..6ecc662d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,6 +38,9 @@ before_script: ci: stage: ci image: nixos/nix:2.18.2 + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' script: - ./bin/nix-build-and-cache ci @@ -50,17 +53,20 @@ ci: artifacts: stage: artifacts image: nixos/nix:2.18.2 + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' script: - ./bin/nix-build-and-cache packages pages: stage: deploy image: nixos/nix:2.18.2 + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH script: - nix build .#website-root - cp --recursive --dereference result public artifacts: paths: - public - only: - - main