-
Notifications
You must be signed in to change notification settings - Fork 33
59 lines (47 loc) · 1.27 KB
/
build_doc.yml
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
name: Build documentation
on: [push, pull_request]
env:
OCAML_DEFAULT_VERSION: 4.14.2
# Add OPAMYES=true to the environment, this is usefill to replace `-y` option
# in any opam call
OPAMYES: true
jobs:
build:
runs-on: ubuntu-latest
env:
OPAMWITHDOC: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }}
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }}
dune-cache: true
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: opam exec -- make doc-deps
- name: Build documentation
run: opam exec -- make doc
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: artifact-doc
path: _build/doc
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: artifact-doc
path: build_doc
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build_doc
target-folder: dev