Skip to content

An example of deploying to GitHub pages with hercules-ci-effects

License

Notifications You must be signed in to change notification settings

hercules-ci/gh-pages-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gh-pages example

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.

How this was written

This section is for educational purposes and future reference. This repository already contains a complete example.

1. Use flake-parts

nix flake init -t flake-parts
nix flake lock

2. Package a documentation site

For this example, we'll use Nix's documentation.

flake.nix

-        packages.default = pkgs.hello;
+        packages.default = pkgs.nix.doc;

3. Add hercules-ci-effects

See the hercules-ci-effects docs.

flake.nix

   inputs = {
+    hercules-ci-effects.url = "github:hercules-ci/hercules-ci-effects";
       imports = [
+        hercules-ci-effects.flakeModule
       ];

4. Configure hercules-ci.github-pages

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";
   };

About

An example of deploying to GitHub pages with hercules-ci-effects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages