Skip to content

Deploy docs site to GitHub Pages #72

Deploy docs site to GitHub Pages

Deploy docs site to GitHub Pages #72

Workflow file for this run

name: Deploy docs site to GitHub Pages
on:
# Runs on pushes targeting the `master` branch or tags.
push:
branches:
- master
tags:
- '*'
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@v5
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 5.4.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@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_docs
enable_jekyll: false
force_orphan: true
- name: Install dune-release
if: startsWith(github.ref, 'refs/tags/')
run: opam install dune-release -y
- name: Release to opam
if: startsWith(github.ref, 'refs/tags/')
uses: davesnx/dune-release-action@v0.2.14
with:
packages: 'melange-fest'
changelog: './CHANGES.md'
github-token: ${{ secrets.GH_TOKEN }}