Skip to content

Merge pull request #990 from IntersectMBO/smelc/hoops-augment-spo-sta… #339

Merge pull request #990 from IntersectMBO/smelc/hoops-augment-spo-sta…

Merge pull request #990 from IntersectMBO/smelc/hoops-augment-spo-sta… #339

Workflow file for this run

name: "Haddock documentation"
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Install Nix
uses: cachix/install-nix-action@v18
with:
# Use last stable nixos channel and the same nix as in channel:
install_url: https://releases.nixos.org/nix/nix-2.11.1/install
nix_path: nixpkgs=channel:nixos-22.11
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
experimental-features = nix-command flakes
allow-import-from-derivation = true
substituters = https://cache.nixos.org https://cache.iog.io
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
- uses: actions/checkout@v4
- name: Fetch nix cache and update cabal indices
run: |
nix develop .\#haddockShell --command \
cabal update
- name: Build whole project
run: |
nix develop .\#haddockShell --command \
cabal build all
- name: Build documentation
run: |
nix develop .\#haddockShell --command \
cabal haddock-project --output=./haddocks --internal --foreign-libraries
- name: Compress haddocks
run: |
tar -czf haddocks.tgz -C haddocks .
- name: Upload haddocks artifact
uses: actions/upload-artifact@v4
if: ${{ always() }}
continue-on-error: true
with:
name: haddocks
path: ./haddocks.tgz
- name: Deploy documentation to gh-pages 🚀
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN || github.token }}
publish_dir: haddocks
cname: cardano-cli.cardano.intersectmbo.org
force_orphan: true