Repository navigation
49 lines (45 loc) · 1.51 KB
/
Copy pathdocs.yml
File metadata and controls
49 lines (45 loc) · 1.51 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
# The documentation site on GitHub Pages, rebuilt on every push to main:
# odoc's reference from the .mli files and the islands compiled by Melange,
# then Starlight's pages around them.
name: docs
on:
push:
branches: [main]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-24.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/configure-pages@v6
- uses: actions/checkout@v5
- uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: "5.5"
opam-repositories: |
hypha: https://github.com/hyphatech/opam-repository.git
default: https://opam.ocaml.org
# `make docs` builds everything first, the tests' libraries too, and
# odoc, a development tool, writes the reference.
- run: opam install . --deps-only --with-test --with-dev-setup -y
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
# Use setup-ocaml's switch instead of the Makefile's.
- run: make docs OPAM="opam exec --"
# The header's version, stars and forks, asked of GitHub's API: with
# the token, past its limit for a runner's shared address.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-pages-artifact@v5
with:
path: _build/docs
- uses: actions/deploy-pages@v5
id: deployment