chore: add initial docs setup

This commit is contained in:
technofab 2025-04-27 16:03:23 +02:00
parent c353798a0c
commit 6308a2dd41
4 changed files with 142 additions and 2 deletions

28
ci.nix
View file

@ -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"'';}
];