-
Notifications
You must be signed in to change notification settings - Fork 56
52 lines (49 loc) · 2.04 KB
/
Copy pathreference.yml
File metadata and controls
52 lines (49 loc) · 2.04 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
name: API reference
on:
push:
paths: ['**/*.hs', '**/*.cabal', 'cabal.project*', 'docs/**', 'scripts/*reference.py', 'scripts/*javascript*', '.github/workflows/reference.yml']
pull_request:
paths: ['**/*.hs', '**/*.cabal', 'cabal.project*', 'docs/**', 'scripts/*reference.py', 'scripts/*javascript*', '.github/workflows/reference.yml']
permissions:
contents: read
jobs:
reference:
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/docs/Gemfile
steps:
- uses: actions/checkout@v7
- uses: haskell-actions/setup@v2
id: haskell
with:
ghc-version: '9.14.1'
cabal-version: '3.18.1.0'
- uses: actions/cache@v6
with:
path: ${{ steps.haskell.outputs.cabal-store }}
key: reference-${{ runner.os }}-${{ steps.haskell.outputs.ghc-version }}-${{ hashFiles('**/*.cabal', 'scripts/build-reference.py') }}
restore-keys: reference-${{ runner.os }}-${{ steps.haskell.outputs.ghc-version }}-
- run: sudo apt-get update && sudo apt-get install -y libpq-dev
- uses: actions/setup-node@v6
with:
node-version: '22'
- name: Install JavaScript compiler and matching Haddock
run: python3 scripts/setup-javascript.py --prefix "$RUNNER_TEMP/spock-javascript" --haddock
- name: Build and check current Haddocks
run: |
source "$RUNNER_TEMP/spock-javascript/env.sh"
python3 scripts/build-reference.py --output "$RUNNER_TEMP/reference"
- name: Check published reference
run: python3 scripts/check-reference.py docs/reference --current
- uses: ruby/setup-ruby@v1
with:
ruby-version: '4.0'
bundler-cache: true
- name: Build website and check its reference
run: |
bundle exec jekyll build --source docs --destination docs/_site
python3 scripts/check-reference.py docs/_site/reference
- uses: actions/upload-artifact@v7
with:
name: api-reference
path: ${{ runner.temp }}/reference