Skip to content

Deploy Docs to Github Pages #1

Deploy Docs to Github Pages

Deploy Docs to Github Pages #1

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Deploy Docs to Github Pages
on:
push:
branches: [$default-branch]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build job
build:
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
- run: opam install --deps-only . --with-doc
- run: opam exec -- dune build @doc
- uses: actions/upload-artifact@v4
with:
name: github-pages
path: _build/default/_doc/_html/**
# Deploy job
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action