Skip to content

Commit

Permalink
Enabled documentation in configuration of Cabal
Browse files Browse the repository at this point in the history
  • Loading branch information
TimeTravelPenguin committed Nov 12, 2023
1 parent a7a2032 commit c6a68b2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,11 @@ jobs:
restore-keys: ${{ env.key }}-

- name: Install dependencies
# If we had an exact cache hit, the dependencies will be up to date.
if: steps.cache.outputs.cache-hit != 'true'
run: cabal build all --only-dependencies

# Cache dependencies already here, so that we do not have to rebuild them should the subsequent steps fail.
- name: Save cached dependencies
uses: actions/cache/save@v3
# If we had an exact cache hit, trying to save the cache would error because of key clash.
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.setup.outputs.cabal-store }}
Expand Down Expand Up @@ -97,14 +94,14 @@ jobs:

- name: Configure the build
run: |
cabal configure --enable-tests --enable-benchmarks --disable-documentation
cabal configure --enable-documentation
cabal build --dry-run
- name: Restore cached dependencies
uses: actions/cache/restore@v3
id: cache
env:
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}-haddock
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}
Expand All @@ -114,6 +111,13 @@ jobs:
run: |
echo "docs_dir=$(cabal haddock all --builddir=docs | tail -1 | xargs dirname)" >> "$GITHUB_ENV"
- name: Save cached dependencies
uses: actions/cache/save@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache.outputs.cache-primary-key }}

- name: Deploy documentation
uses: JamesIves/github-pages-deploy-action@v4
with:
Expand Down

0 comments on commit c6a68b2

Please sign in to comment.