-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (50 loc) · 1.77 KB
/
pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Publish GitHub Pages
on:
push:
branches:
- 'main'
jobs:
build:
# Why not ubuntu-22.04? I get from GitHub:
# **************************************************************
# * Press Control+C again quickly to perform an emergency exit *
# **************************************************************
#
# Error: The operation was canceled.
# runs-on: macos-latest (still gets killed during odoc -link)
runs-on: ubuntu-22.04
# runs-on: Ubuntu22-8core-32GB
if: false
permissions:
# Needed for peaceiris/actions-gh-pages@v3
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: OCaml 5.2.x
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 5.2.x
dune-cache: false # true does not publish pages consistently
- name: Install Opam prereqs
if: runner.os == 'Linux'
run: sudo apt install libcurl4-openssl-dev
# - name: Install Opam prereqs
# if: runner.os == 'macOS'
# run: brew install XXX
- name: Install Opam dependencies
# Must wait for opam 2.2 on setup-ocaml for:
# 1. opam install --subpath option to work.
# 2. {with-dev-setup} filter to work.
run: |
sed s/with-dev-setup/with-doc/g src/DkStdRestApis_NotStripe.opam | tee DkStdRestApis_NotStripe.opam
opam install . --deps-only --with-doc
- name: Build odoc
run: opam exec -- dune build --verbose @doc
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/default/_doc/_html