This repository demonstrates a deployment of GitHub Pages using Hercules CI.
You are free to reuse this code in your own projects; see CC0 license.
This section is for educational purposes and future reference. This repository already contains a complete example.
nix flake init -t flake-parts
nix flake lock
For this example, we'll use Nix's documentation.
flake.nix
- packages.default = pkgs.hello;
+ packages.default = pkgs.nix.doc;
See the hercules-ci-effects docs.
flake.nix
inputs = {
+ hercules-ci-effects.url = "github:hercules-ci/hercules-ci-effects";
imports = [
+ hercules-ci-effects.flakeModule
];
flake.nix
+ hercules-ci.github-pages.branch = "main";
perSystem = { config, ... }: {
packages.default = pkgs.nix.doc;
+ hercules-ci.github-pages.settings.contents = config.packages.default + "/share/doc/nix/manual";
};