Skip to content

Commit d76c3f0

Browse files
committed
#119: Add GitHub Actions workflow for generating Haddock documentation.
1 parent af7b269 commit d76c3f0

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

.github/workflows/haddock.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
2+
# SPDX-License-Identifier: MIT
3+
---
4+
# yamllint disable rule:line-length
5+
name: haddock
6+
'on':
7+
push:
8+
branches:
9+
- master
10+
permissions:
11+
contents: write
12+
jobs:
13+
haddock:
14+
runs-on: macos-15
15+
steps:
16+
- uses: actions/checkout@v6
17+
- uses: actions/cache@v4
18+
with:
19+
path: |
20+
~/.ghcup
21+
~/.cabal/packages
22+
~/.cabal/store
23+
~/.ghc
24+
dist-newstyle
25+
key: ${{ runner.os }}-haddock-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('cabal.project', 'cabal.project.freeze') }}
26+
restore-keys: |
27+
${{ runner.os }}-haddock-
28+
- uses: haskell-actions/setup@v2.8.0
29+
with:
30+
ghc-version: '9.6.7'
31+
cabal-version: '3.12.1.0'
32+
- run: cabal update
33+
- run: cabal haddock --haddock-hyperlink-source --haddock-html-location='https://hackage.haskell.org/package/$pkg-$version/docs'
34+
- uses: JamesIves/github-pages-deploy-action@v4
35+
with:
36+
folder: dist-newstyle/build/aarch64-osx/ghc-9.6.7/phino-0.0.0.0/doc/html/phino
37+
branch: gh-pages

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[![cabal-linux](https://github.com/objectionary/phino/actions/workflows/cabal.yml/badge.svg)](https://github.com/objectionary/phino/actions/workflows/cabal.yml)
77
[![stack-linux](https://github.com/objectionary/phino/actions/workflows/stack.yml/badge.svg)](https://github.com/objectionary/phino/actions/workflows/stack.yml)
88
[![codecov](https://codecov.io/gh/objectionary/phino/branch/master/graph/badge.svg)](https://codecov.io/gh/objectionary/phino)
9+
[![Haddock](https://img.shields.io/badge/docs-Haddock-blue.svg)](https://objectionary.github.io/phino/)
910
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSES/MIT.txt)
1011
[![Hits-of-Code](https://hitsofcode.com/github/objectionary/phino?branch=master&label=Hits-of-Code)](https://hitsofcode.com/github/objectionary/phino/view?branch=master&label=Hits-of-Code)
1112
[![PDD status](https://www.0pdd.com/svg?name=objectionary/phino)](https://www.0pdd.com/p?name=objectionary/phino)

phino.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ copyright: 2025 Objectionary.com
1313
category: Language, Code Analysis
1414
build-type: Simple
1515
extra-source-files: resources/*.yaml
16+
extra-doc-files: README.md
1617

1718
source-repository head
1819
type: git

0 commit comments

Comments
 (0)