| 1 |
name: Deploy odoc to GitHub Pages |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
|
| 8 |
permissions: read-all |
| 9 |
|
| 10 |
concurrency: |
| 11 |
group: deploy-odoc |
| 12 |
cancel-in-progress: true |
| 13 |
|
| 14 |
jobs: |
| 15 |
deploy-odoc: |
| 16 |
name: Deploy odoc to GitHub Pages |
| 17 |
|
| 18 |
environment: |
| 19 |
name: github-pages |
| 20 |
url: ${{ steps.deployment.outputs.page_url }} |
| 21 |
|
| 22 |
permissions: |
| 23 |
contents: read |
| 24 |
id-token: write |
| 25 |
pages: write |
| 26 |
|
| 27 |
runs-on: ubuntu-latest |
| 28 |
|
| 29 |
steps: |
| 30 |
- name: Checkout tree |
| 31 |
uses: actions/checkout@v5 |
| 32 |
|
| 33 |
- name: Set-up OCaml |
| 34 |
uses: ocaml/setup-ocaml@v3 |
| 35 |
with: |
| 36 |
ocaml-compiler: "5.2" |
| 37 |
|
| 38 |
- name: Install dependencies |
| 39 |
run: opam install . --deps-only --with-doc |
| 40 |
|
| 41 |
- name: Build documentation |
| 42 |
run: opam exec -- dune build @doc |
| 43 |
|
| 44 |
- name: Set-up Pages |
| 45 |
uses: actions/configure-pages@v5 |
| 46 |
|
| 47 |
- name: Upload artifact |
| 48 |
uses: actions/upload-pages-artifact@v4 |
| 49 |
with: |
| 50 |
path: _build/default/_doc/_html |
| 51 |
|
| 52 |
- name: Deploy odoc to GitHub Pages |
| 53 |
id: deployment |
| 54 |
uses: actions/deploy-pages@v4 |