Add nix app to deploy to Codeberg
This commit is contained in:
parent
a5b107285d
commit
f4afca0913
1 changed files with 16 additions and 0 deletions
16
flake.nix
16
flake.nix
|
|
@ -52,6 +52,22 @@
|
|||
${pkgs.hugo}/bin/hugo --minify
|
||||
'').outPath;
|
||||
};
|
||||
deploy = {
|
||||
type = "app";
|
||||
meta = {
|
||||
description = "Deploy to Codeberg";
|
||||
homepage = "https://kremer.codeberg.page";
|
||||
license = nixpkgs.lib.licenses.cc0;
|
||||
};
|
||||
program =
|
||||
(pkgs.writeShellScript "deploy-website" ''
|
||||
set -e
|
||||
${pkgs.hugo}/bin/hugo --minify
|
||||
cd public
|
||||
git commit --all -m "Deploy"
|
||||
git push
|
||||
'').outPath;
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue