move ci job scipts into an actual script

This will make it possible/easier to:

* share code between jobs
* run jobs locally
This commit is contained in:
Charles Hall 2024-12-01 16:23:26 -08:00
parent d4ffa78979
commit 540cc89c83
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
3 changed files with 57 additions and 6 deletions

View file

@ -42,9 +42,7 @@ ci:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
script:
- direnv exec . nix-build-and-cache ci
- direnv exec . engage
- direnv exec . job ci
cache:
paths:
- target
@ -57,7 +55,7 @@ artifacts:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
script:
- direnv exec . nix-build-and-cache packages
- direnv exec . job artifacts
pages:
stage: deploy
@ -65,8 +63,7 @@ pages:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
- nix build .#website-root
- cp --recursive --dereference result public
- direnv exec . job pages
artifacts:
paths:
- public