Skip to content

More Haddock adjustments #3

More Haddock adjustments

More Haddock adjustments #3

Workflow file for this run

name: Haddock to GitHub pages
on:
push:
branches: [ main ]
jobs:
build:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache Stack
id: cache-stack-unix
uses: actions/cache@v3
with:
path: ~/.stack
key: ubuntu-latest-stack-home-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}
- name: Setup stack
uses: haskell/actions/setup@v2
with:
enable-stack: true
stack-no-global: true
- name: Build Haddock
shell: bash
run: |
shopt -s globstar && \
stack exec haddock -- ./src/**/*.hs \
$(for m in src/**/Internal/*.hs; do echo -n " --hide $m" | sed -r -e 's|/|.|g' -e 's|.src.||' -e 's|.hs||'; done) \
--html --pretty-html --hyperlinked-source --quickjump \
--title="IOTasks" \
--odir docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
name: github-pages
path: docs
retention-days: 1
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}