11name : " Haddock documentation"
22
33on :
4+ workflow_dispatch :
5+ pull_request : # TODO: remove
46 push :
57 branches :
68 - master
@@ -14,48 +16,49 @@ 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+ - uses : rrbutani/use-nix-shell-action@v1
3129
32- - name : Fetch nix cache and update cabal indices
30+ - name : Update cabal indices
3331 run : |
34- nix develop --command \
35- cabal update
32+ cabal update
3633
3734 - name : Build whole project
3835 run : |
39- nix develop --command \
40- cabal build all
36+ cabal build all
4137
4238 - name : Build documentation
4339 run : |
44- nix develop --command \
45- cabal haddock-project --local --output=./haddocks --internal --foreign-libraries
40+ cabal haddock-project -v --local --output=./haddocks --internal --foreign-libraries
4641
4742 - name : Compress haddocks
4843 run : |
4944 tar -czf haddocks.tgz -C haddocks .
5045
5146 - name : Upload haddocks artifact
52- uses : actions/upload-artifact@v4
47+ uses : actions/upload-artifact@v7
5348 if : ${{ always() }}
5449 continue-on-error : true
5550 with :
5651 name : haddocks
5752 path : ./haddocks.tgz
5853
54+ - name : Upload cabal logs
55+ uses : actions/upload-artifact@v7
56+ if : failure()
57+ continue-on-error : true
58+ with :
59+ name : cabal-haddock-logs
60+ path : ~/.cache/cabal/logs/
61+
5962 - name : Deploy documentation to gh-pages 🚀
6063 if : github.ref == 'refs/heads/master'
6164 uses : peaceiris/actions-gh-pages@v4
0 commit comments