mirror of
https://gitlab.com/TECHNOFAB/nixlets.git
synced 2025-12-11 17:40:07 +01:00
chore: add initial docs setup
This commit is contained in:
parent
c353798a0c
commit
6308a2dd41
4 changed files with 142 additions and 2 deletions
28
ci.nix
28
ci.nix
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
ci = {
|
||||
stages = ["check" "upload"];
|
||||
stages = ["check" "build" "deploy"];
|
||||
jobs = {
|
||||
"check" = {
|
||||
stage = "check";
|
||||
|
|
@ -8,8 +8,32 @@
|
|||
"nix flake check --impure"
|
||||
];
|
||||
};
|
||||
"docs" = {
|
||||
stage = "build";
|
||||
script = [
|
||||
# sh
|
||||
''
|
||||
nix build .#docs:default
|
||||
mkdir -p public
|
||||
cp -r result/. public/
|
||||
''
|
||||
];
|
||||
artifacts.paths = ["public"];
|
||||
};
|
||||
"pages" = {
|
||||
nix.enable = false;
|
||||
image = "alpine:latest";
|
||||
stage = "deploy";
|
||||
script = ["true"];
|
||||
artifacts.paths = ["public"];
|
||||
rules = [
|
||||
{
|
||||
"if" = "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH";
|
||||
}
|
||||
];
|
||||
};
|
||||
"upload" = {
|
||||
stage = "upload";
|
||||
stage = "deploy";
|
||||
rules = [
|
||||
{"if" = ''$CI_COMMIT_REF_NAME == "main"'';}
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue