Skip to content

Deploy docs site to GitHub Pages #34

Deploy docs site to GitHub Pages

Deploy docs site to GitHub Pages #34

Workflow file for this run

name: Deploy docs site to GitHub Pages
on:
# Runs on pushes targeting the `master` branch.
push:
branches:
- master
schedule:
# Prime the caches every Monday
- cron: 0 1 * * MON
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 5.1.1
- name: Install all deps
run: make install
- name: Format check
run: make format-check
- name: Run tests
run: make test
- name: Build docs
run: make docs
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_docs
enable_jekyll: false
force_orphan: true