forked from OCamlPro/ocplib-simplex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new workflow to publish the odoc documentation of `master` branch and compile `ocplib-simplex` with both `OCaml` 4.08.1 and 5.0.0.
- Loading branch information
Showing
2 changed files
with
45 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
OCAML_DEFAULT_VERSION: 5.0.0 | ||
OPAMYES: true | ||
|
||
jobs: | ||
odoc: | ||
name: Odoc documentation | ||
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@v2 | ||
with: | ||
allow-prerelease-opam: true | ||
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }} | ||
dune-cache: true | ||
|
||
- name: Install dependencies | ||
run: opam install . --deps-only --with-doc | ||
|
||
- name: Make odoc documentation | ||
run: opam exec -- make doc | ||
|
||
- name: Upload documentation | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: odoc | ||
path: _build/default/_doc/_html/ |