11name : " Haddock documentation"
22
33on :
4+ workflow_dispatch :
5+ pull_request : # TODO: remove
46 push :
57 branches :
68 - master
@@ -14,48 +16,52 @@ jobs:
1416 shell : bash
1517
1618 steps :
17- - name : Install Nix
18- uses : cachix/install-nix-action@v18
19+ - uses : actions/checkout@v6
20+
21+ - uses : cachix/install-nix-action@v31
1922 with :
20- # Use last stable nixos channel and the same nix as in channel:
21- nix_path : nixpkgs=channel:nixos-24.05
2223 github_access_token : ${{ secrets.GITHUB_TOKEN }}
2324 extra_nix_config : |
25+ accept-flake-config = true
2426 access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
25- experimental-features = nix-command flakes
26- allow-import-from-derivation = true
27- substituters = https://cache.nixos.org https://cache.iog.io
28- trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
2927
30- - uses : actions/checkout@v4
28+ # GHC 9.14 avoids the tyConStupidTheta panic in GHC 9.6 haddock
29+ - uses : rrbutani/use-nix-shell-action@v1
30+ with :
31+ devShell : .#ghc914
3132
32- - name : Fetch nix cache and update cabal indices
33+ - name : Update cabal indices
3334 run : |
34- nix develop --command \
35- cabal update
35+ cabal update
3636
3737 - name : Build whole project
3838 run : |
39- nix develop --command \
40- cabal build all
39+ cabal build all
4140
4241 - name : Build documentation
4342 run : |
44- nix develop --command \
45- cabal haddock-project --local --output=./haddocks --internal --foreign-libraries
43+ cabal haddock-project --local --output=./haddocks --internal --foreign-libraries
4644
4745 - name : Compress haddocks
4846 run : |
4947 tar -czf haddocks.tgz -C haddocks .
5048
5149 - name : Upload haddocks artifact
52- uses : actions/upload-artifact@v4
50+ uses : actions/upload-artifact@v7
5351 if : ${{ always() }}
5452 continue-on-error : true
5553 with :
5654 name : haddocks
5755 path : ./haddocks.tgz
5856
57+ - name : Upload cabal logs
58+ uses : actions/upload-artifact@v7
59+ if : failure()
60+ continue-on-error : true
61+ with :
62+ name : cabal-haddock-logs
63+ path : ~/.cache/cabal/logs/
64+
5965 - name : Deploy documentation to gh-pages 🚀
6066 if : github.ref == 'refs/heads/master'
6167 uses : peaceiris/actions-gh-pages@v4
0 commit comments