Skip to content

Deploy several documentations #22

Deploy several documentations

Deploy several documentations #22

Workflow file for this run

name: Build documentation
on: [push, pull_request]
permissions:
contents: write
env:
OCAML_DEFAULT_VERSION: 4.14.2
# Add OPAMYES=true to the environment, this is usefill to replace `-y` option
# in any opam call
OPAMYES: true
jobs:
build:
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@v3
with:
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }}
dune-cache: true
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: opam exec -- make doc-deps
- name: Build documentation
run: opam exec -- make doc
- name: Upload artifact
uses: actions/upload-artifact@master
with:
name: artifact-doc
path: _build/doc
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@master
with:
name: artifact-doc
path: build_doc
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: build_doc
destination_dir: dev
enable_jekyll: true
github_token: ${{ secrets.GITHUB_TOKEN }}