File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838 - name : Build and run tests (macOS, x86_64 via Rosetta)
3939 if : runner.os == 'macOS'
4040 run : nix build -L .#packages.x86_64-darwin.default
41+
42+ docs :
43+ runs-on : ubuntu-latest
44+ needs : build
45+ if : github.event_name == 'push' && github.ref == 'refs/heads/master'
46+ permissions :
47+ contents : write
48+ steps :
49+ - uses : actions/checkout@v4
50+
51+ - uses : cachix/install-nix-action@v31
52+ with :
53+ nix_path : nixpkgs=channel:nixpkgs-unstable
54+
55+ - name : Build (produces Haddock docs via cabal)
56+ run : nix build -L
57+
58+ - name : Collect Haddock output
59+ run : |
60+ html=$(find -L result/share/doc -type d -name html | head -1)
61+ echo "HADDOCK_DIR=$html" >> "$GITHUB_ENV"
62+
63+ - name : Deploy to GitHub Pages
64+ uses : peaceiris/actions-gh-pages@v4
65+ with :
66+ github_token : ${{ secrets.GITHUB_TOKEN }}
67+ publish_dir : ${{ env.HADDOCK_DIR }}
You can’t perform that action at this time.
0 commit comments