Skip to content

Commit a28fb51

Browse files
authored
Merge pull request #47 from mlabs-haskell/connor/github-pages
build and deploy github pages
2 parents e274ee3 + a15d3f6 commit a28fb51

File tree

3 files changed

+32
-8
lines changed

3 files changed

+32
-8
lines changed

flake.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hercules-ci.nix

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
};
1818
};
1919

20+
hercules-ci.github-pages.branch = "main";
21+
22+
perSystem = { config, ... }: {
23+
hercules-ci.github-pages.settings.contents = config.packages.plutus-ledger-api-rust-github-pages;
24+
};
25+
2026
herculesCI = herculesArgs: {
2127
onPush.default = {
2228
outputs.effects = withSystem "x86_64-linux"

plutus-ledger-api/build.nix

+23-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{ inputs, ... }: {
2-
perSystem = { config, system, ... }:
1+
{ inputs, lib, ... }: {
2+
perSystem = { config, system, pkgs, ... }:
33
let
44
rustFlake =
55
inputs.flake-lang.lib.${system}.rustFlake {
@@ -12,8 +12,26 @@
1212
(path: _type: builtins.match ".*golden$" path != null)
1313
];
1414
};
15+
16+
plutus-ledger-api-rust-github-pages = pkgs.stdenv.mkDerivation {
17+
name = "plutus-ledger-api-github-pages";
18+
src = rustFlake.packages.plutus-ledger-api-rust-doc;
19+
buildPhase = ''
20+
mkdir $out
21+
cp -r -L -v $src/share/doc/* $out/
22+
echo '<meta http-equiv="refresh" content="0; url=plutus_ledger_api">' > $out/index.html
23+
'';
24+
};
1525
in
16-
{
17-
inherit (rustFlake) packages checks devShells;
18-
};
26+
lib.mkMerge
27+
[
28+
{
29+
inherit (rustFlake) packages checks devShells;
30+
}
31+
{
32+
packages = {
33+
inherit plutus-ledger-api-rust-github-pages;
34+
};
35+
}
36+
];
1937
}

0 commit comments

Comments
 (0)