Skip to content

Added the foldWithKey interface #30

Added the foldWithKey interface

Added the foldWithKey interface #30

name: Documentation
on:
push:
branches: [master]
jobs:
build-and-deploy:
if: contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cabal/ghc
uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: '9.6.3'
cabal-version: '3.10.2.0'
- name: Set PATH for cabal-installed executables
run: |
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
- name: Set Cabal options
# Overwriting prevent cabal from raising an error when installing
# an executable that is already present (because of caching)
# Some of these options are superfluous for this workflow,
# but I'm keeping them in sync with ci.yml so that caching is
# shared
run: |
cabal update
cabal user-config update -f -a "overwrite-policy: always"
cabal user-config update -f -a "install-method: copy"
cabal user-config update -f -a "split-sections: True"
cabal user-config update -f -a "executable-stripping: True"
- name: Cache cabal work
uses: actions/cache@v3
with:
path: |
dist-newstyle
${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ runner.os }}-${{ hashFiles('cabal.*') }}-cabal-install
# We are building twice such that we can see build errors. If successful,
# the second build should be fast
- name: Build documentation
run: |
cabal haddock javelin -j --disable-optimization
htmlloc=$(cabal haddock javelin -j --disable-optimization | tail -n 1)
mkdir docs
cp -r $htmlloc docs
- name: Deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs/javelin
clean: true