-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.6 KB
/
test-deploy-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
name: test-deploy-doc
on:
pull_request:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
jobs:
test-deploy:
name: Test deployment
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: doc/package-lock.json
- name: Install Docusaurus Dependencies
working-directory: ./doc
run: npm ci
- name: Setup OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: "5.2.x"
opam-repositories: |
default: https://github.com/ocaml/opam-repository.git
mbarbin: https://github.com/mbarbin/opam-repository.git
# janestreet-bleeding: https://github.com/janestreet/opam-repository.git
# janestreet-bleeding-external: https://github.com/janestreet/opam-repository.git#external-packages
- name: Install OCaml Dependencies
run: opam install . --deps-only --with-doc
- name: Build Odoc Pages
run: opam exec -- dune build @doc
- name: Copy Odoc Pages to Docusaurus Static Directory
run: |
rm -rf doc/static/odoc
cp -R _build/default/_doc/_html doc/static/odoc
- name: Build Website
working-directory: ./doc
run: npm run build