Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
Add GitHub action to update docs on pushes to main
Browse files Browse the repository at this point in the history
Taken from setup-ocaml examples [here]. Closes #27.

[here]: https://github.com/ocaml/setup-ocaml/blob/master/EXAMPLES.md
  • Loading branch information
punchagan committed Aug 29, 2024
1 parent 25a288d commit 94890d5
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
name: Deploy odoc to GitHub Pages

on:
push:
branches:
- main

permissions: read-all

concurrency:
group: deploy-odoc
cancel-in-progress: true

jobs:
deploy-odoc:
name: Deploy odoc to GitHub Pages

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

permissions:
contents: read
id-token: write
pages: write

runs-on: ubuntu-latest

steps:
- name: Checkout tree
uses: actions/checkout@v4

- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 5

- name: Install dependencies
run: opam install . --deps-only --with-doc

- name: Build documentation
run: opam exec -- dune build @doc

- name: Set-up Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: _build/default/_doc/_html

- name: Deploy odoc to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 94890d5

Please sign in to comment.