-
Notifications
You must be signed in to change notification settings - Fork 755
72 lines (59 loc) · 1.69 KB
/
Copy pathgithub-page.yml
File metadata and controls
72 lines (59 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: "Haddock documentation"
on:
workflow_dispatch:
pull_request: # TODO: remove
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v6
- uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
accept-flake-config = true
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
# GHC 9.14 avoids the tyConStupidTheta panic in GHC 9.6 haddock
- uses: rrbutani/use-nix-shell-action@v1
with:
devShell: .#ghc914
- name: Update cabal indices
run: |
cabal update
- name: Build whole project
run: |
cabal build all
- name: Build documentation
run: |
cabal haddock-project --local --output=./haddocks --internal --foreign-libraries
- name: Compress haddocks
run: |
tar -czf haddocks.tgz -C haddocks .
- name: Upload haddocks artifact
uses: actions/upload-artifact@v7
if: ${{ always() }}
continue-on-error: true
with:
name: haddocks
path: ./haddocks.tgz
- name: Upload cabal logs
uses: actions/upload-artifact@v7
if: failure()
continue-on-error: true
with:
name: cabal-haddock-logs
path: ~/.cache/cabal/logs/
- 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-node.cardano.intersectmbo.org
force_orphan: true