Skip to content

Commit

Permalink
GitHub Pages: fix missing odoc content (#15)
Browse files Browse the repository at this point in the history
* disable dune cache
* remove deprecated ocaml/setup-ocaml/deploy-doc action
  • Loading branch information
just-max authored May 13, 2024
1 parent 5a00eb2 commit 75dd306
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/odoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,24 @@ jobs:
contents: write
steps:
- name: Checkout tree
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set-up OCaml 5.1.1
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: "5.1.1"
dune-cache: true
# disable cache, otherwise generated documentation is missing files
dune-cache: false

- run: opam install . --deps-only --with-doc
shell: bash

- run: opam exec -- dune build --verbose @doc
shell: bash

- name: Deploy odoc to GitHub Pages
# last version of setup-ocaml with deploy-doc
# TODO: https://github.com/ocaml/setup-ocaml/blob/master/EXAMPLES.md
# #using-the-official-github-pages-actions-to-deploy-odoc-to-github-pages
uses: ocaml/setup-ocaml/[email protected]
uses: peaceiris/actions-gh-pages@v4
with:
destination-dir: ${{ github.head_ref || github.ref_name }}
github_token: ${{ github.token }}
publish_dir: _build/default/_doc/_html
destination_dir: ${{ github.head_ref || github.ref_name }}

0 comments on commit 75dd306

Please sign in to comment.